Skip to content
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

Error during build #3

Closed
rajagopalx opened this issue Apr 1, 2018 · 4 comments
Closed

Error during build #3

rajagopalx opened this issue Apr 1, 2018 · 4 comments

Comments

@rajagopalx
Copy link

I m using vue cli 2 to create application. During build process I am getting

ERROR in static/js/vendor.f66189cd88822a0ceea7.js from UglifyJs
Unexpected token: punc ({) [./node_modules/vue-luxon/vue-luxon.js:1,0][static/js/vendor.f66189cd88822a0ceea7.js:68134,4]

@casbloem
Copy link
Owner

casbloem commented Apr 1, 2018 via email

@casbloem casbloem closed this as completed Apr 2, 2018
@rajagopalx
Copy link
Author

In dev dependency, "babel-preset-es2015": "^6.24.1". But still error occurs.

@casbloem
Copy link
Owner

casbloem commented Apr 7, 2018

Did you enable it?

@aaronpeterson
Copy link

aaronpeterson commented Apr 23, 2018

Same here, btw. I can't seem to get webpack to babel-load any es6 npm modules. Curious if anyone ever figures it out. The problem is that babel-loader is usually set to ignore node_modules/. One can make exceptions but webpack needs a way to know what is es6 and what isn't. Since it can't tell, it assumes node_modules/ is es5 and pipes it to uglify.

The solution is somewhat tedious and requires excluding package by package like so -- the 43 ups here must have a lot of free time.

My guess is that this is why most npm packages I see with src in es6 still transpile main distributions to es5.

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

No branches or pull requests

3 participants