-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ngrx/effects breaks uglifyjs in Angular CLI with the use of es2015 #428
Comments
We will need a reproduction for this. @ngrx/effects is published in a variety of formats, including ES2015, ES5 with ES2015 modules, and an ES5 UMD build. You can explore the build artifacts in our nightly repositories and verify that the published |
I have it too with ngrx4. Works on ng serve but fails on ng build. Swtiching to ES6 on my tsconfig.app.json doesn't help, just multiply the issue. Any ideas on this one? I researched the web about it and I didn't find any real solution
|
thx, good to know I'm not the only one. As far as I understand ES5 is still the way to go for the time being. Everything else (ES2015) is nice to have, but currently not of much use. I did also migrate away from Angular CLI 1.1. |
Just so you know I found a temp fix that worked: Install babili for webpack by
Go to: Change production.js to: (Or in other words change from uglifyJS to babili) |
note that babili supports ES6, but that is not the thing I want to have. It will break for the users without having a ES6 compatible browser. |
In case this helps someone: check for a bad import. Very easy with IDEs that (helpfully) offer alternatives for symbols that show up in more than one place. import {createSelector} from "@ngrx/store/store"; That will pull in the ES2015 source... |
I'm submitting a...
What is the current behavior?
Angular CLI production build fails:
The issue lies in
https://github.com/ngrx/platform/blob/master/modules/effects/tsconfig-build.json
making use of target=es2015
See angular/angular-cli#5730 for more information.
Expected behavior:
make use of target=es5 for compilation
Version of affected browser(s),operating system(s), npm, node and ngrx:
windows, @ngrx/[email protected], angular cli 1.4.3, angular 4.4.3.
The text was updated successfully, but these errors were encountered: