forked from 1035141145/wantonly-drag-open
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvue.config.js
More file actions
22 lines (20 loc) · 795 Bytes
/
vue.config.js
File metadata and controls
22 lines (20 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const CompressionPlugin = require('compression-webpack-plugin')
// const isProd = process.env.NODE_ENV === 'production'
module.exports = {
publicPath: './',
outputDir: './dist',
assetsDir: 'static',
filenameHashing: true, // false 来关闭文件名哈希
lintOnSave: false, // 关闭eslint
// 打包时不生成.map文件
productionSourceMap: false,
configureWebpack: () => ({
plugins: [
new CompressionPlugin({
test: /\.js$|\.html$|\.css$|\.jpg$|\.jpeg$|\.png/, // 需要压缩的文件类型
threshold: 5120, // 归档需要进行压缩的文件大小最小值,这个对 10K 以上的进行压缩
deleteOriginalAssets: false, // 是否删除原文件
}),
],
}),
}