3

There is a lot of questions like this one (for example this one), and everyone says that the solution is just to install babel-plugin-syntax-dynamic-import.

But, in my case, I have it already installed. I had webpack@3 before, and it worked. Now I'm upgrading to v4; just installed new version of webpack – and dynamic imports does not work anymore.

ERROR in ./layouts/ClassList/index.js 89:9
Module parse failed: Unexpected token (89:9)
You may need an appropriate loader to handle this file type.
|
| var Component = (0, _decorators.asChunk)(function () {
>   return import( /* webpackChunkName: "ClassList" */"./Component");
| });

How is it possible? And how to make work again?

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
jeron-diovis
  • 788
  • 1
  • 8
  • 19

0 Answers0