0.1.0 • Published 5 years ago
@postinumero/babel-preset-i18next v0.1.0
@postinumero/babel-preset-i18next
Extract translation keys from the application and packages code.
Usage
- Project-wide Babel config is required in root directory, e.g.
babel.config.json
:
{
"babelrcRoots": ["./src", "./node_modules/some-package/**"], // Extract translations from these paths. Paths must also include this preset (see `.babelrc` below).
"presets": ["@postinumero/i18next"]
}
.babelrc.json
insrc
and packages:
{
"presets": ["@postinumero/i18next"]
}
Options
Options (with some defaults) are passed to babel-plugin-i18next-extract
:
{
"presets": [
[
"@postinumero/i18next",
{ "outputPath": "./public/extracted-keys/{{ns}}.json" }
]
]
}
0.1.0
5 years ago