Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

When building production bundle with webpack, I get error like "Unexpected token: name ***" #7

Closed
StefH opened this issue Aug 26, 2016 · 3 comments

Comments

@StefH
Copy link
Contributor

StefH commented Aug 26, 2016

In my test project : https://github.com/StefH/angular2-webpack-starter

When running this command:
npm run build:prod

I get this error:

ERROR in vendor.69478d51da2d091f9ad7.bundle.js from UglifyJs
SyntaxError: Unexpected token: name (PagedResult) [vendor.69478d51da2d091f9ad7.bundle.js:29019,6]

Any idea ? Maybe related to es5/es5 ?

@gallayl
Copy link
Owner

gallayl commented Aug 26, 2016

it's related to arrow functions with UglifyJS, check this thread: joeeames/WebpackFundamentalsCourse#3

@gallayl gallayl closed this as completed Aug 26, 2016
@StefH
Copy link
Contributor Author

StefH commented Aug 26, 2016

Sorry, I cannot understand the solution. Can you please provide more details?

Also found a reference here:
PatrickJS/PatrickJS-starter#853

@StefH
Copy link
Contributor Author

StefH commented Mar 17, 2017

I created a fork which does use es5.
See here : https://github.com/StefH/angular-odata-es5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants