Skip to content

'ng build --prod' failing with es5 as target #7303

@joshhobson

Description

@joshhobson

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

1.2.7
Also seen on 1.2.1 before I updated in an attempt to fix

Repro steps.

ng build --prod

The log given by the failure.

ERROR in vendor.749569c349ba199c26dd.bundle.js from UglifyJs
Unexpected token: name (Decoder) [vendor.749569c349ba199c26dd.bundle.js:26296,6]

I know there are many issues similar to this but I have been unable to fix it using the suggestions. I have tried setting my target to 'es5' and this doesn't help. The UglifyJSWebpackPlugin fix doesn't seem to be possible without configuring the build completely myself.

I should note, where ever this Decoder class is coming from, it's not in code I've written (which seems to make sense given it's in vendor) and I have no way to find out where it is coming from. It may well be an unused library but it's tricky to track down (a quick grep shows at least 5 "Decoder" classes in my node_modules".

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions