What is the current behavior?
If null is passed as localization argument while creating new I18nPlugin instance, warning about missing localizations occurs.
If the current behavior is a bug, please provide the steps to reproduce.
WARNING in ./example.js
Missing localization: Missing Text
webpack.config.js:
const languages = {
en: null,
de: require("./de.json")
};
module.exports = Object.keys(languages).map(function(language) {
return {
...
plugins: [
new I18nPlugin(languages[language]) // in case 'language' is 'en' we get 'null'
]
...
});
What is the expected behavior?
If passing null is recommended way how not to translate default language, plugin should behave differently than if try to get missing translation.
Bug report
What is the current behavior? If
null
is passed aslocalization
argument while creating new I18nPlugin instance, warning about missing localizations occurs.If the current behavior is a bug, please provide the steps to reproduce.
"build": "webpack"
npm run build
Build succeeds but throws following warning:
webpack.config.js:
What is the expected behavior? If passing
null
is recommended way how not to translate default language, plugin should behave differently than if try to get missing translation.Other relevant information: webpack version: 4.29.6 Node.js version: v11.12.0 Operating System: macOS Mojave 10.14.4