I tried using ngtools / webpack to compile AOT. It worked fine until I tried to create lazy loaded routes. The error I get is - Error: Cannot find module './components/dashboard/dashboard.module.ngfactory'.
. In the dist folder, I also skip chunks for lazy downloaded packages.
I have no idea what I'm doing wrong, I spent a lot of time to fix it. I created a simple project tour of heroes
in this repo where I got the error described above. Branch in repo angular-aot-refactor
. When you get to the root of the application - simply npm install
and npm run dev:aot
.
The question is what am I doing wrong, so lazy loading does not work?
Thanks in advance for your help!
source
share