slexx1234/v-webp

Error on UglifyJs build

carromeu opened this issue · 1 comments

Hi team,

First, thanks for this package! It's really useful.

I am using it whith VueJS and Webpack. On build, occurs:

ERROR in static/js/vendor.399bd106dde2d3f0edeb.js from UglifyJs
Unexpected token: name (WebP) [./node_modules/v-webp/index.js:1,0][static/js/vendor.399bd106dde2d3f0edeb.js:100841,6]

Any suggestion to fix?

Uglify cannot parse ES6, it will throw you syntax errors. Post-process your generated JS with babel, or use a different minifier.