You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
ERROR in ./ClientApp/boot-client.ts Module build failed: TypeError: loaderUtils.getOptions is not a function at Object.module.exports (/Volumes/Mac HDD/Documentos/Workspace/AAPB_Web/AAPB_Web/node_modules/angular-router-loader/src/index.js:12:27)
ERROR in ./ClientApp/boot-server.ts Module build failed: TypeError: loaderUtils.getOptions is not a function at Object.module.exports (/Volumes/Mac HDD/Documentos/Workspace/AAPB_Web/AAPB_Web/node_modules/angular-router-loader/src/index.js:12:27)
I have added the loader in the sharedConfig from the file webpack.config.js and added a chunkFilename in the output object.
Nevermind. I just found the answer. No one said I have to install the loader-utils package. So, one thing less to achieve lazy loading on Angular + Webpack.
@naveedahmed1 try using angular2-router-loader. People have updated the Angular template to use this one now. Maybe it's a good idea to pull this Project and compare it with your Project to see what improvements have been made. The latest version has lazy loading enabled.
Activity
rasert commentedon Jul 13, 2017
Nevermind. I just found the answer. No one said I have to install the loader-utils package. So, one thing less to achieve lazy loading on Angular + Webpack.
naveedahmed1 commentedon Sep 3, 2017
Which version of angular-router-loader and loader-utils you are using. I tried latest versions of both but still getting this error.
rasert commentedon Sep 5, 2017
@naveedahmed1 try using angular2-router-loader. People have updated the Angular template to use this one now. Maybe it's a good idea to pull this Project and compare it with your Project to see what improvements have been made. The latest version has lazy loading enabled.
naveedahmed1 commentedon Sep 6, 2017
Yes I tried that and it works but it seems that angular2-router-loader is now angular-router-loader. So, shouldnt we use angular-router-loader now?
jrmcdona commentedon Nov 25, 2017
@naveedahmed1 did you achieve preloading modules? If yes, can I check your webpack.config.js that works for preloading modules and this template?
Thanks
naveedahmed1 commentedon Nov 25, 2017
I haven't tried preloading but I think this template by Mark has preloading enabled https://github.com/MarkPieszak/aspnetcore-angular2-universal
You might also want to take a look at upcoming template:
#1288 (comment)