-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentseverity5: regressiontype: bug/fixworkaround2: non-obvious
Description
Bug Report or Feature Request (mark with an x)
- bug report -> Similar to issue @ngtools/webpack v1.2.9 doesn't produce factories for lazy routes #4637, now closed, but for latest ngtools
- feature request
Versions.
- Output from:
ng --version. ng is not installed in this project.@ngtools/webpack is. - output from:
node --version: v6.2.2 npm --version: 3.9.5- OS: Windows 10 version 1703, as well as Mac OS Sierra
- angular 4.1.3,
@ngtools/webpack 1.3.1,- webpack 2.5.1,
- typescript 2.3.2.
Repro steps.
There's a mini sample project showing the issue.
- Clone repository https://github.com/BrainCrumbz/ngtools-webpack-demo and change dir
npm inpm run build-prod
The log given by the failure.
[...redacted...]
[378] ./~/tslib/tslib.es6.js 8.02 kB {1} [built]
[] -> factory:652ms building:2489ms = 3141ms
[379] ./~/zone.js/dist/zone.min.js 29.8 kB {1} [built]
[] -> factory:2333ms building:2441ms dependencies:616ms = 5390ms
+ 369 hidden modules
ERROR in Could not resolve "src/app/module" from "src/app/module".
Child src\shared\view\not-found.component.html:
[0] ./src/shared/view/not-found.component.html 376 bytes {0} [built]
factory:132ms building:31ms = 163ms
Child src\private\view\component.html:
[0] ./src/private/view/component.html 291 bytes {0} [built]
factory:116ms building:38ms = 154ms
[...redacted...]
Desired functionality.
Build should complete successfully.
Mention any other details that might be useful.
The app has a lazily loaded module (dubbed private). You can build it in development as well (npm run build-dev), serve it from another shell (npm run serve) and browse to localhost:3000. The readme in repository root shows all npm commands.
The AOT build is not using full angular-cli, just @ngtools/webpack.
I tried fiddling with angularCompilerOptions.genDir value in AOT tsconfig, with no luck. That just changed the error message, for example it changed the path as Could not resolve "./src/app/module" from "./src/app/module"., but no real clue about it.
mradcliffe
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentseverity5: regressiontype: bug/fixworkaround2: non-obvious