Skip to content

v0.9.0 BREAKING CHANGE

Latest
Compare
Choose a tag to compare
@ph1p ph1p released this 20 Dec 17:09
· 2 commits to master since this release

This release has BREAKING CHANGES. It uses a new scanner/parser (https://github.com/i18next/i18next-parser), because of #15. Thanks to @KhaledSakr.
The last version depending on i18next-scanner is v0.8.3.

Migrate config

from:

new i18nextWebpackPlugin({
  options: {
    func: {
      list: ['t', '$t', 'i18next.t', 'i18n.t'],
      extensions: ['.js', '.jsx'],
    },
    lngs: ['en', 'de'],
    resource: {
      loadPath: '{{lng}}/{{ns}}.json',
      savePath: '{{lng}}/{{ns}}.json',
    },
  },
});

to:

new i18nextWebpackPlugin({
  extensions: ['.js', '.jsx'],
  options: {
    lexers: {
      js: [
        {
          lexer: 'JavascriptLexer',
          functions: ['t', '$t', 'i18next.t', 'i18n.t'],
        },
      ],
    },
    locales: ['en', 'de'],
    output: '$LOCALE/$NAMESPACE.json',
  },
});