Closed rajagopalx closed 6 years ago
Try to add the babel-preset-es2015
dependency to fix this.
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.
I m using vue cli 2 to create application. During build process I am getting