Closed m-korkut closed 6 years ago
+1 same problem
You code contains ES6
, uglifyjs-webpack-plugin
use uglify-js
to compress code and uglify-js
doesn't support ES6
, use https://github.com/webpack-contrib/terser-webpack-plugin
Execution of "yarn add uglifyjs-webpack-plugin" can be temporarily resolved. The specific reasons need to be further searched.
I use uglifyjs-webpack-plugin. I get this error :"ERROR in ./assets/js/commons.js from UglifyJs Unexpected token: keyword (const) [./assets/js/commons.js:13526,0] "
what's the solution to this ?
version info : nodejs: v8.12.0 npm 6.4.1, webpack: "^4.21.0", "uglifyjs-webpack-plugin": "^2.0.1", "babel-loader": "^8.0.4",
babel : 7