Webpack production build fails with UglifyJS error build failed
GoodLuckIce opened this issue · 2 comments
GoodLuckIce commented
Steps to reproduce
$ vue init webpack test
Complete steps. (Using standalone build and npm.)
$ cd test
$ npm install -S vue-pdf
Add
import pdf from 'vue-pdf'
to src/main.js
Build with minimization enabled
$ ./node_modules/.bin/webpack -p --config build/webpack.prod.conf.js
Observe UglifyJS error:
ERROR in static/js/app.820627baa05d51e0b5e2.js from UglifyJs
Unexpected token: keyword (const) [static/js/app.820627baa05d51e0b5e2.js:19624,3]
FranckFreiburger commented
Can you try to switch from uglifyjs (uglify-es) to terser ?
Terser has a better support of ES6+ and also has its webpack plugin
carlos00027 commented
todavia tengo este error no se que hacer ayuda!!!