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

Webpack production build fails with UglifyJS error build failed #140

Open
GoodLuckIce opened this issue Feb 14, 2019 · 2 comments
Open

Webpack production build fails with UglifyJS error build failed #140

GoodLuckIce opened this issue Feb 14, 2019 · 2 comments

Comments

@GoodLuckIce
Copy link

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
Copy link
Owner

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
Copy link

todavia tengo este error no se que hacer ayuda!!!

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