-
Notifications
You must be signed in to change notification settings - Fork 12k
ng build --prod generates error if target is es6 #3191
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
Comments
Uglifyjs (and by extension the CLI) currently doesn't support es6 |
Thanks for the info. |
Is there any workaround? Any way to select another minifier? |
So this means angular-cli is not compatible with es6 as a target? |
@LanderBeeuwsaert At this point in time, yes. |
Any roadmap on making this an option? It appears that using "uglify-es" instead of "uglify-js" would make this possible - perhaps adding an option in the angular-cli config to use this version? I don't know the larger ramifications of this proposed change - but it seems like a reasonable option. |
I have similar issue, but even with target="es5" (after using |
Having the same issue here. I'm targeting es5, but UglifyJS errors when trying to create the vendor bundle. I'm importing a couple es6 files from my node_modules. It would be nice to either use Uglify-es or transpile files before sending them to Uglify-js without having to do an |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
OS?
Versions.
Repro steps.
The log given by the failure.
ERROR in main.9e857c22c48e133aa50b.bundle.js from UglifyJs
SyntaxError: Unexpected token: name (AppComponent) [D:/intelliJ/testcli/cli/~/angular2-template-loader!D:/intelliJ/testcli/cli/src/app/app.component.ts:8,0][main.9e857c22c48e133aa50b.bundle.js:38265,4]
Mention any other details that might be useful.
The text was updated successfully, but these errors were encountered: