I\'m trying to migrate my app to webpack 4. My head hurts already.
Dynamic imports - this is my method of code splitting (page by page). But I can\
I was facing the same issue the fix was:
npm install --save-dev @babel/plugin-syntax-dynamic-import
add following line to .babelrc
"plugins": ["@babel/plugin-syntax-dynamic-import"],
Sources:
https://webpack.js.org/guides/code-splitting/#dynamic-imports
https://babeljs.io/docs/plugins/syntax-dynamic-import/#installation