Browse Source

打包自动压缩文件

feature
mk 2 years ago
parent
commit
861a074b41
  1. 1
      package.json
  2. 27
      vue.config.js

1
package.json

@ -71,6 +71,7 @@
"cross-env": "^7.0.3",
"dai-js": "^0.0.12",
"element-theme-chalk": "^2.13.0",
"filemanager-webpack-plugin": "^2.0.5",
"natives": "^1.1.6",
"ol": "^7.2.2",
"sass-loader": "^7.3.1",

27
vue.config.js

@ -1,7 +1,19 @@
/*
* @Author: mk 2403457699@qq.com
* @Date: 2023-08-28 19:45:33
* @LastEditors: mk 2403457699@qq.com
* @LastEditTime: 2023-09-12 19:24:04
* @Description: 介绍一下改动了什么
*
*
*/
/**
* 配置参考: https://cli.vuejs.org/zh/config/
*/
const IS_PROD = ['production', 'test'].includes(process.env.NODE_ENV)
const FileManagerPlugin = require('filemanager-webpack-plugin')
module.exports = {
baseUrl: process.env.NODE_ENV === 'production' ? '' : '/epmet-work-pc',
css: {
@ -56,6 +68,19 @@ module.exports = {
'@v': '@/views',
'@m': '@/img'
}
},
plugins: [
new FileManagerPlugin({
onEnd: {
delete: [
'./epmet-work-pc.zip',
],
archive: [
{ source: './epmet-work-pc', destination: './epmet-work-pc.zip' },
]
}
}
})
],
},
}

Loading…
Cancel
Save