You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Not a webpack bundle unhandled rejection on every chunk #10
Multi entry webpack 4 (latest) configuration on Node 14.
It does this for every chunk
errored out during transformation Error: /Users/claudio/Projects/loom/js/404-3594367e1117c0d15bb5.js: Not a webpack bundle
at mod (/Users/claudio/Projects/loom/node_modules/optimize-plugin/dist/worker.js:203:15)
at /Users/claudio/Projects/loom/node_modules/optimize-plugin/dist/worker.js:211:9
at Array.forEach (<anonymous>)
at getWebpackModules (/Users/claudio/Projects/loom/node_modules/optimize-plugin/dist/worker.js:207:10)
at getWebpackBootstrap (/Users/claudio/Projects/loom/node_modules/optimize-plugin/dist/worker.js:85:25)
at /Users/claudio/Projects/loom/node_modules/optimize-plugin/dist/worker.js:256:29
at Array.forEach (<anonymous>)
at PluginPass.Program (/Users/claudio/Projects/loom/node_modules/optimize-plugin/dist/worker.js:255:26)
at newFn (/Users/claudio/Projects/loom/node_modules/optimize-plugin/node_modules/@babel/traverse/lib/visitors.js:175:21)
at NodePath._call (/Users/claudio/Projects/loom/node_modules/optimize-plugin/node_modules/@babel/traverse/lib/path/context.js:55:20) {
type: 'Error',
code: 'BABEL_TRANSFORM_ERROR'
}
Hiya - this seems the same as the second issue mentioned in #7.
Are you able to share your Webpack configuration - in particular the mode, target and output options?
Awesome, 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.
Oh 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 :)
For 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.
Activity
developit commentedon Dec 14, 2020
Hiya - this seems the same as the second issue mentioned in #7.
Are you able to share your Webpack configuration - in particular the
mode,targetandoutputoptions?keepitterron commentedon Dec 14, 2020
Absolutely!
babel.configcontains preset/react and preset/env with no modules nor target options set.developit commentedon Dec 18, 2020
Awesome, 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.
keepitterron commentedon Dec 20, 2020
Oh 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 :)
developit commentedon Dec 21, 2020
@keepitterron it's a little buried in the docs, but there now:
https://webpack.js.org/plugins/module-concatenation-plugin/#optimization-bailouts
3zzy commentedon Dec 28, 2020
We bundle multiple separate 'apps' so we definitely need multiple entries, not something we can avoid unfortunately.
developit commentedon Feb 24, 2021
For 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.