Open daniele-zurico opened 7 years ago
Same here, I think it's related to using also angular2-template-loader but can't confirm it right now.
I get the same error. I am using Webpack 2.2.1, and Angular 5.2.
I think the problem is because the line substituted for the sub module is:
{path: "sub", loadChildren: () => require("./sub.module")("SubModule") }
If you put that straight into your app.routing.ts, you will get the same error in the browser console.
If you use this, then it works:
{path: 'sub', loadChildren: () => require('./sub.module')['SubModule'] }
So I think the loader needs to be fixed to use square brackets [] around the sub module section, stead of () brackets.
Any chance of a fix @Quramy ?
Many thanks 👍
Hi I'm trying to use your loader but I receive in the console this kind of error:
VM6476:48 EXCEPTION: Uncaught (in promise): TypeError: __webpack_require__(...) is not a function
my webpack.config is:
and I use in that way:
Wbpack-version:
"webpack": "^2.1.0-beta.25",
what I did wrong?