-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webpack build fails if webpack-i18n-extractor-plugin and mini-css-extract-plugin used together #2
Comments
Thanks for the bug report. I'll take a look at it when I return from vacation next week. |
I've published version 2.0.2, which fixes the problem with your test case. I'm not sure if it will fix it for all use cases. You may end up needing to use the noLoadEntryChunkResources option to work around the issue. Basically, the problem is that the mini-css-extract-plugin loads the bootstrap module at build time to obtain the returned reference to the entry module. The webpack-i18n-extractor-plugin modifies the bootstrap code to return a promise to the entry module rather than the entry module itself because of the need to possibly load language chunks asynchronously before the entry module can be defined, and the mini-css-extract-plugin doesn't expect the promise value. The fix I delivered changes the behavior of the webpack-i18n-extractor-plugin to return a promise to the entry module only if there are language chunks that need to be loaded. Otherwise, it will return a reference to the module. This may be sufficient to resolve the issue since the the mini-css-extract-plugin only seems to do this when the entry module is a css module. |
It works for me now. Thanks! |
I tried to use webpack-i18n-extractor-plugin together with mini-css-extract-plugin. The build fails with the following error:
When I remove WebpackI18nExtractorPlugin from the configuration, the build finishes successfully.
The simple project demonstrating this issue can be found here.
The text was updated successfully, but these errors were encountered: