Parsing of import()
fails in 4.29.0 (Compilation issue, related to dynamic import) #8656
Closed
Description
Bug report
What is the current behavior?
I've updated to v4.29.0, and my code is no longer compiling.
Error:
Module parse failed: Unexpected token (11:10)
You may need an appropriate loader to handle this file type.
| var AsyncHome = asyncComponent(appendAsyncReducer, epicSubject$, function () {
| return process.env.SERVER ? require('./home')
> : import(
| /* webpackChunkName: "books" */
| './home');
@ ./server/ssr.js 15:0-34 167:25-34
@ ./server/index.js
If I revert to v4.28.2, it works again.
If the current behavior is a bug, please provide the steps to reproduce.
- Clone
https://github.com/Dbuggerx/react-book-search-sample.git
npm i
and compile the code (npm run start-server
ornpm run start
) - it should work- Now, install webpack v4.29.0 and try to compile again
What is the expected behavior?
It should compile the code without errors, as it was doing on v4.28.2
Other relevant information:
webpack version: v4.29.0
Node.js version: v10.15.0
Operating System: Fedora linux 29
Metadata
Assignees
Labels
No labels