<!-- IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION YOUR ISSUE MIGHT BE CLOSED WITHOUT INVESTIGATING --> ### Bug Report or Feature Request (mark with an `x`) ``` - [ ] bug report -> please search issues before submitting - [ ] feature request ``` I have a Angular 4 application. I can successfully build the project with ng build But, when I run ng build --prod error is thrown. When I did some research, I saw uglifyjs not working with es6 and I changed target to es5 in my tsconfig file. But I keep getting this error. I don't understand what is wrong. ### Versions. <!-- Output from: `ng --version`. If nothing, output from: `node --version` and `npm --version`. Windows (7/8/10). Linux (incl. distribution). macOS (El Capitan? Sierra?) -->  ### Repro steps. <!-- Simple steps to reproduce this bug. Please include: commands run, packages added, related code changes. A link to a sample repo would help too. --> 1. Run this command: `ng build --prod` ### The log given by the failure. <!-- Normally this include a stack trace and some more information. --> ERROR in vendor.4008cf7dff2b98412878.bundle.js from UglifyJs Unexpected token: name (Subject) [vendor.4008cf7dff2b98412878.bundle.js:19471,6] ### Desired functionality. <!-- What would like to see implemented? What is the usecase? --> The build should finish without an error ### Mention any other details that might be useful. <!-- Please include a link to the repo if this is related to an OSS project. -->