Repository navigation
Not a webpack bundle unhandled rejection on every chunk #10
Description
Activity
Hiya - this seems the same as the second issue mentioned in #7.
Are you able to share your Webpack configuration - in particular themode,targetandoutputoptions?- addedneeds more infoMore information is needed to diagnose.More information is needed to diagnose.
on Dec 14, 2020 Absolutely!
{ "entry":{ ...multiple entries }, "output":{ "path":"/Users/claudio/Projects/loom/dist/webpack", "publicPath":"https://cdn.loom.com/assets/", "filename":"js/[name]-[contenthash].js" }, "devtool":false, "module":{ "rules":[...rules] }, "optimization":{ "moduleIds":"hashed", "splitChunks":{ "cacheGroups":{ "default":false, "commons":{ "name":"commons", "test":{ }, "chunks":"all", "minChunks":3 } } }, }, "plugins":[...plugins], "resolve":{...aliases only}, "mode":"production" }babel.configcontains preset/react and preset/env with no modules nor target options set.Reacted by Jason MillerReacted by Jason MillerAwesome, thanks for this. I will try to set up a test case. I likely missed some bundle parsing cases for multi-entry since I avoid using multi-entry whenever possible for performance reasons.
Reacted by Claudio SemeraroOh that's very interesting. I can intuitively understand why would it be a performance drain, do you have any links where I can learn more (multi entry webpack)? 🙏
I'll do some digging of my own in the meanwhile :)@keepitterron it's a little buried in the docs, but there now:
https://webpack.js.org/plugins/module-concatenation-plugin/#optimization-bailoutsWe bundle multiple separate 'apps' so we definitely need multiple entries, not something we can avoid unfortunately.
Reacted by Dave BuchhoferFor those hitting this issue, you can disable automatic modernization via
new OptimizePlugin({ modernize: false }). This improves performance, but will use the unmodified ES5 source of most npm modules since they do not publish modern code.
Multi entry webpack 4 (latest) configuration on Node 14.
It does this for every chunk
Any pointers? 🙏