You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
What is the current behavior?
When using @angular v4, @ngrx v4 and have the following config in tsconfig.json:
"paths": {
"*": [
"./node_modules/*"
]
}
webpack will generate incorrect output because it bundles @ngrx/store twice in the dist folder (correct ES5 bundle and the ES6 code from src folder).
Open the generated app.js and search for class Store and Store.prototype. You will see that the same code is bundled twice.
Then the app will fail with this error message:
Unhandled Promise rejection: No provider for Store! ; Zone: ; Task: Promise.then ; Value: Error: No provider for Store!
Reason: the class will be registered to the DI but EffectsModule will try to get the Store by using the ES5 function as the token.
The issue does not happen when using Angular 5 even if paths config is specified in tsconfig.
Expected behavior:
The FESM5 contents are bundled.
Minimal reproduction of the problem with instructions:
Remove `JavaScript` from `src` folder as this is not required by the consumers with `Angular 4.x.x`, `@ngtools/webpack` and `paths` in `tsconfig.json` it causes the `src` to be bundled togather with the `FESM`.
Closes: ngrx#629
I'm submitting a...
What is the current behavior?
When using @angular v4, @ngrx v4 and have the following config in tsconfig.json:
webpack will generate incorrect output because it bundles @ngrx/store twice in the dist folder (correct ES5 bundle and the ES6 code from src folder).
Open the generated app.js and search for class Store and Store.prototype. You will see that the same code is bundled twice.
Then the app will fail with this error message:
Reason: the class will be registered to the DI but EffectsModule will try to get the Store by using the ES5 function as the token.
The issue does not happen when using Angular 5 even if paths config is specified in tsconfig.
Expected behavior:
The FESM5 contents are bundled.
Minimal reproduction of the problem with instructions:
https://github.com/peterbakonyi05/angular4-ngrx4-webpack-bundling-issue
Read the readme for further explanation how to get the problem
Version of affected browser(s),operating system(s), npm, node and ngrx: all
Other information:
Angular 4.XX
NGRX 4.X.X
The text was updated successfully, but these errors were encountered: