sdu-react-scripts-i18n 1.1.2
Install from the command line:
Learn more about npm packages
$ npm install @elseu/sdu-react-scripts-i18n@1.1.2
Install via package.json:
"@elseu/sdu-react-scripts-i18n": "1.1.2"
About this version
Install the dependencies
npm i @lingui/cli @lingui/core @lingui/macro @lingui/react -D
Create a lingui.config.js
file in the root of your project
import { config } from '@elseu/sdu-react-scripts-i18n';
/** @type {import('@lingui/conf').LinguiConfig} */
module.exports = {
...config,
locales: config.locales.filter(locale => {
// filter out dev on production, optionally other locales can be discarded as well
if (process.env.ENVIRONMENT === 'production' && locale === 'dev') return false;
return true;
});
};
Create npm scripts in package.json
"translations:extract": "lingui extract",
"translations:compile": "lingui compile",
"translations": "npm run translations:extract && npm run translations:compile"
Details
- sdu-react-scripts-i18n
-
elseu
- over 1 year ago
- MIT
- 8 dependencies
Assets
- sdu-react-scripts-i18n-1.1.2.tgz
Download activity
- Total downloads 13,225
- Last 30 days 22
- Last week 3
- Today 0