-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
- [x ] bug report -> please search issues before submitting
- [x ] feature request
Versions.
angular 5.0.0
ngtools/webpack 1.8.0
Repro steps.
we have application that uses umd angular libraries which reference current application modules. with new compiler-cli this is not supported as it does a check if module resides within node_modules folder. with old cli we were able to use webpacl alias's to resolve this. but seems like with new version we are not able to complete this change.
Gives below error:
Error: Trying to import a source file from a node_modules package: import /Users/123/stash/features/xyz-ui/app/xyz/core/coreModule.ts from /Users/123/stash/features/xyz-ui/node_modules/@ xyz/ux/ux.ngfactory.ts
Ex:
our application has core module under app/core/coreModule.ts and also contains app/core/public_api.ts (which exports coreModule.ts)
application also uses umd bundled library from node_modules/@xyz/ux folder using @xyz/ux import. and this folder reference app/core/coreModule through @xyz/core import.
our build tscofnig contains paths to point @xyz/core to app/core/public_api.ts.
with new compiler and ngtool/webpack builder we are not able to build the app as compiler_host.ts throws error from below line.
Appreciate if this can be resolved with next minor version.