Error during build
Closed this issue · 4 comments
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]
In dev dependency, "babel-preset-es2015": "^6.24.1". But still error occurs.
Did you enable it?
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.