1.0.2 breaks code splitting
See original GitHub issueUpdating from “^1.0.1” to “^1.0.2” has broken my code splitting. This shouldn’t be a breaking change from a patch update.
{
test: /\.jsx?$/,
include: [ APP, CONFIG, SERVER ],
loader: 'babel-loader',
options: {
presets: [
[ 'env', {
targets: { browsers: [ 'last 2 versions' ] },
modules: false,
} ],
'react',
],
plugins: [
'dynamic-import-webpack',
'transform-export-extensions',
'transform-decorators-legacy',
'transform-class-properties',
'transform-object-rest-spread',
'add-module-exports',
'lodash',
'ramda',
'react-require',
[ 'provide-modules', {
'debug': 'debug',
} ],
'babel-root-import',
],
},
}
Also possibly worth note is:
resolve: {
modules: [ SRC, STYLES, 'node_modules' ],
extensions: [
'.js', '.jsx', '.scss',
],
},
And using react-loadable/webpack
Issue Analytics
- State:
- Created 6 years ago
- Comments:12
Top Results From Across the Web
Code-splitting for libraries—bundling for npm with Rollup 1.0
Here I want to make the case for why this is a game-changer not only for the frontend but for libraries as well....
Read more >Rollup now has code-splitting! And we need your help - Medium
Code-splitting breaks your app into smaller chunks, so that the user only has to load enough JavaScript to get started, and the application...
Read more >Code-splitting with TypeScript and Webpack - David East
Code-splitting is a feature I'd pay for. It's amazing. Take one large JavaScript file and break it into smaller pieces with one keyword....
Read more >Code Splitting - webpack
This feature allows you to split your code into various bundles which can then be loaded on demand or in parallel. It can...
Read more >loadable-components | Yarn - Package Manager
loadable-components. owner smooth-code23.5kMITdeprecated2.2.3TS vulns 0 vulnerabilities. Please use @loadable/component. React code splitting made easy.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think I’ve found the problem. Babel is merging configs so a server side render that uses
"dynamic-import-node"
in a .babelrc is being merged into the webpack loader config… 😐edit:
Thanks for the help everyone 😃 👍
@loganfsmyth there aren’t any errors when left out in development. The problem is that the code split chunks aren’t being created and so only the normal chunks are created without errors.
edit: also see my edits for https://github.com/airbnb/babel-plugin-dynamic-import-webpack/issues/42#issuecomment-375813672 I tried the syntax plugin to no avail 😦