uglifyjs is not used, but UglifyJs error is reported when packaging; Unexpected token: name (raf) [main_25188b.js:121200,4]

Article directory background: Troubleshoot the error locally The local project package.json does not have UglifyJs dependencies installed. It is speculated that one of the dependencies of a plug-in itself contains UglifyJs UglifyJs errors can be solved by compiling with babel and converting es6 to es5. Change the configuration of babel-loader from exclude to include to […]

Use UglifyJS to implement a command to package and publish project instances

In front-end page development, projects built with frameworks such as Vue, Angular, and React usually automatically configure tools that integrate relevant code compression and release. Developers only need to execute specified commands to complete the overall compression and release of the project. For projects that do not use the framework, developers need to manually configure […]

[Solved] ERROR in static/js/83.ddf6431954f7a77ff2a5.js from UglifyJs Unexpected token name ?currentVersion?

ERROR in static/js/83.ddf6431954f7a77ff2a5.js from UglifyJs Unexpected token name ?currentVersion?, expected punc If you encounter this exception, you need to run the following script run npm i -D uglifyjs-webpack-plugin@beta Modify webpack.prod.conf.js put the original new webpack.optimize.UglifyJsPlugin ({ compress: { warnings: false }, sourceMap: config.build.productionSourceMap, parallel: true }), change to const UglifyJsPlugin = require(‘uglifyjs-webpack-plugin’) new UglifyJsPlugin(), Problem […]

[Solved] vue.config.js build package UglifyJsPlugin to clear the console and print console.log, and the error appears `warnings` is not a supported option

In the front-end development process, console.log is often used for debugging convenience. The development, testing environment can be printed, but the production environment is the most Well not, after all not friendly and not very pretty. uglifyjs-webpack-plugin Going online to the production environment, we hope to cancel all the printing functions, and it is definitely […]