I'm working on a React/Webpack/Globalize app.
In development mode things are ok-ish (though Globalize insists on compiling all locales instead of the one i have selected but that's another question for another day).
However, when I'm setting production: true
in my webpack config, I'm getting the following error when running npm run build
> webpack --config webpack.prod.config.js
/opt/app/ui/node_modules/globalize-webpack-plugin/GlobalizeCompilerHelper.js:72
throw e;
^
Error: No formatters or parsers has been provided
I was under the impression the globalize webpack plugin is meant to handle precompilation. Any idea why I'm seeing this error? When I'm setting production: false
things compile fine.
My plugin setup is:
new GlobalizePlugin({
production: true,
developmentLocale: "en",
supportedLocales: [ "en"],
output: "i18n/[locale].[hash].js"
}),
When a file changes and webpack dev server rebuilds, I'm getting a LOT of these messages indicating recomplication of locales I am not using:
[461] ./~/cldr-data/main/es-PY/dateFields.json 15 kB {0} [optional]
[462] ./~/cldr-data/main/es-SV/dateFields.json 15 kB {0} [optional]
[463] ./~/cldr-data/main/es-US/dateFields.json 15 kB {0} [optional]
[464] ./~/cldr-data/main/es-UY/dateFields.json 15 kB {0} [optional]
[465] ./~/cldr-data/main/es-VE/dateFields.json 15 kB {0} [optional]
[466] ./~/cldr-data/main/es/dateFields.json 15 kB {0} [optional]
Nothing I try seems to get passed that problem.
Thanks