mirror of
https://github.com/luc-github/ESP3D-WEBUI.git
synced 2026-03-04 15:14:02 +01:00
35 lines
772 B
JavaScript
35 lines
772 B
JavaScript
/**
|
|
* This plugin is used to minify your JavaScript.
|
|
* Docs: https://github.com/webpack-contrib/terser-webpack-plugin
|
|
*/
|
|
|
|
import TerserPlugin from "terser-webpack-plugin"
|
|
|
|
const config = {
|
|
parallel: true,
|
|
cache: false,
|
|
sourceMap: false,
|
|
terserOptions: {
|
|
parse: {
|
|
// Let terser parse ecma 8 code but always output
|
|
// ES5 compliant code for older browsers
|
|
ecma: 8,
|
|
},
|
|
compress: {
|
|
ecma: 5,
|
|
warnings: false,
|
|
comparisons: false,
|
|
},
|
|
mangle: {
|
|
safari10: true,
|
|
},
|
|
output: {
|
|
ecma: 5,
|
|
comments: false,
|
|
ascii_only: true,
|
|
},
|
|
},
|
|
}
|
|
|
|
export default () => new TerserPlugin(config)
|