Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@twoday/react-intl-bundled-messages

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twoday/react-intl-bundled-messages

`IntlProvider` that lazy loads messages in current language in Webpack environment.

latest
Source
npmnpm
Version
1.4.0
Version published
Maintainers
2
Created
Source

@twoday/react-intl-bundled-messages

IntlProvider that lazy loads messages in current language in Webpack environment.

Usage

Bundled messages

  • Add module resolve alias. In Webpack config:

    import bundledMessagesWebpackAlias from "@twoday/react-intl-bundled-messages/lib/webpackAlias.js";
    
    export default {
      //...
      resolve: {
        alias: {
          ...bundledMessagesWebpackAlias(mode),
        },
      },
    };
    
  • Build messages using @twoday/formatjs-scripts

  • Add IntlProvider:

    import { IntlProvider } from "@twoday/react-intl-bundled-messages";
    
    function App() {
      return <IntlProvider>...</IntlProvider>;
    }
    

Messages from envManifest

  • Build messages using @twoday/env-public-config-and-messages-scripts

  • Add IntlProvider:

    import { IntlProvider } from "@twoday/react-intl-bundled-messages";
    import envManifest from "./.env-manifest.json";
    
    function App() {
      return <IntlProvider envManifest={envManifest}>...</IntlProvider>;
    }
    

FAQs

Package last updated on 28 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts