1.0.0 • Published 7 years ago

i18n-webpack-plugin v1.0.0

Weekly downloads
6,211
License
MIT
Repository
github
Last release
7 years ago

npm deps test coverage chat

npm i -D i18n-webpack-plugin

This plugin creates bundles with translations baked in. So you can serve the translated bundle to your clients.

see webpack/webpack/examples/i18n.

plugins: [
  ...
  new I18nPlugin(languageConfig, optionsObj)
],
  • optionsObj.functionName: the default value is __, you can change it to other function name.
  • optionsObj.failOnMissing: the default value is false, which will show a warning message, if the mapping text cannot be found. If set to true, the message will be an error message.
  • optionsObj.hideMessage: the default value is false, which will show the warning/error message. If set to true, the message will be hide.