webpack-aot
webpack-aot copied to clipboard
Where are ngfactory files?
Your repo is compiling fine under AOT. I used the same config for my project and I am getting following exception:
ERROR in ./src/main.aot.ts
Module build failed: Error: /Users/webapp/src/main.aot.ts (3,34): Cannot find module './ngfactory/app/app.module.ngfactory'.)
at _checkDiagnostics (/Users/webapp/node_modules/@ngtools/webpack/src/loader.js:145:15)
at /Users/webapp/node_modules/@ngtools/webpack/src/loader.js:172:17
@ multi (webpack)-dev-server/client?http://localhost:5000 ./src/main.aot.ts
I am not seeing ngfactory files when I compile your repo.
Same, no NgFactory files being produced.
git clone (repo)
npm i && npm run build
Results in:
ERROR in ./app/main.aot.ts
Module not found: Error: Can't resolve './ngfactory/app/app.module.ngfactory' in 'C:\Source\GitHub\webpack-aot\app'
@ ./app/main.aot.ts 3:0-74
ERROR in ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
Module not found: Error: Can't resolve 'C:\Source\GitHub\webpack-aot\app\ngfactory' in 'C:\Source\GitHub\webpack-aot\node_modules\@angular\core\src\linker'
@ ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js 69:15-36 85:15-102
@ ./~/@angular/core/src/linker.js
@ ./~/@angular/core/src/core.js
@ ./~/@angular/core/index.js
@ ./~/@angular/platform-browser/src/browser.js
@ ./~/@angular/platform-browser/src/platform-browser.js
@ ./~/@angular/platform-browser/index.js
@ ./app/main.aot.ts
Child app\app.component.html:
[0] ./app/app.component.html 144 bytes {0} [built]
Child app\app.component.scss:
[0] ./app/app.component.scss 49 bytes {0} [built]
You get the same error with lazy loading modules as well