Open ijavid opened 6 years ago
Late to the party but I was able to get this to work with Angular7 with one exception.
Adding this to your tsconfig.json
under compilerOptions will prevent the Angular npm package from being read twice.
"paths": {
"@angular/*": [
"../node_modules/@angular/*"
]
}
The only exception is that it will not work with the AoT enabled, have not dug into the why but disabling AoT / build optimizer under the "build" config in the angular.json
file.
"configurations": {
"production": {
...
"aot": false,
"buildOptimizer": false,
...
}
}
Same problem here with angular 7.2.2. Your solution didn't worked.
When using library in a Angular6 project the compilation fails on the following error:
ERROR in node_modules/@angular/core/src/render3/ng_dev_mode.d.ts(9,11): error TS2451: Cannot redeclare block-scoped variable 'ngDevMode'.
Root cause: The Angular npm packages are read twice.
Please release a new version which supports Angular6