1.0.4 • Published 2 years ago

babel-plugin-parse-translation v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

WARNING! it doesn't work since 7.16. version of babel

To install:\ yarn add -D babel-plugin-parse-translation

You may need also @babel/preset-typescript

Add config file babel-locales.config.js:

module.exports = {
  presets: [
    '@babel/preset-env',
    [
      '@babel/preset-typescript',
      {
        allExtensions: true,
        isTSX: true,
      },
    ],
  ],
  plugins: [
    [
      'parse-translation',
      {
        localesPath: './public/locales',
      },
    ],
  ],
};

Add yarn locales command to package.json:

{ 
  "scripts": {
    "locales": "babel --extensions \".tsx\" --config-file babel-locales.config.js ./src"
  }
}

Run yarn locales

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago