eslint
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
const { defineConfig } = require("@vue/cli-service");
|
||||
const CompressionPlugin = require("compression-webpack-plugin");
|
||||
const WebpackObfuscator = require('webpack-obfuscator');
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
|
||||
module.exports = defineConfig({
|
||||
|
||||
@@ -11,7 +10,7 @@ module.exports = defineConfig({
|
||||
|
||||
// 为生产环境修改配置
|
||||
//if (process.env.NODE_ENV === 'production') {
|
||||
if (true) {
|
||||
|
||||
config.plugins.push(
|
||||
new WebpackObfuscator({
|
||||
compact: true,//压缩代码
|
||||
@@ -41,7 +40,7 @@ module.exports = defineConfig({
|
||||
deleteOriginalAssets: false, // 是否删除未压缩的源文件,谨慎设置,如果希望提供非gzip的资源,可不设置或者设置为false(比如删除打包后的gz后还可以加载到原始资源文件)
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
},
|
||||
transpileDependencies: true,
|
||||
chainWebpack: (config) => {
|
||||
|
||||
Reference in New Issue
Block a user