gzip
Former-commit-id: b853eac3802fba4933f408419fa2871c0542c79e Former-commit-id: 18280818313621485f2f565820d6dc461fda0012 Former-commit-id: d758c0b5e43cdae0f78944ef52d48250e8f39250 Former-commit-id: 0daeb67fa1591a8c065ae417b878ed058728c994 [formerly 8d15aafb1d6beb22f691b89288cd8c032b9f992d] Former-commit-id: 6701f57219bec24eab257eb66e0e46a2dc5c0b34 Former-commit-id: 14a3d65168e57ad2220ea437bf90e441bd50e9d2 Former-commit-id: ceea51a11ce2706725e16f3f32025d129b3f30d7 Former-commit-id: 5427d43f7fa6a3225785301664d3e4f3d71a7ab7 Former-commit-id: 01f1de75df462c1889201c70d07f6cf753de6592
This commit is contained in:
@@ -1 +1 @@
|
||||
213de9ce178b3a02a223fafdb870d31a6ec053c6
|
||||
975a87cbfa94ae0055fa5dbbf387398b44b8c8f0
|
||||
@@ -61,6 +61,7 @@
|
||||
"@vue/test-utils": "1.0.0-beta.29",
|
||||
"babel-eslint": "^10.0.2",
|
||||
"babel-jest": "^24.8.0",
|
||||
"compression-webpack-plugin": "^3.0.1",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-plugin-vue": "^5.2.2",
|
||||
"sass": "^1.21.0",
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
const CompressionWebpackPlugin = require('compression-webpack-plugin')
|
||||
|
||||
const VueFilenameInjector = require('@d2-projects/vue-filename-injector')
|
||||
|
||||
const ThemeColorReplacer = require('webpack-theme-color-replacer')
|
||||
@@ -28,6 +30,18 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
},
|
||||
configureWebpack: {
|
||||
plugins: [
|
||||
// gzip
|
||||
new CompressionWebpackPlugin({
|
||||
filename: '[path].gz[query]',
|
||||
test: new RegExp('\\.(js|css|svg|woff|ttf|json|html)$'),
|
||||
threshold: 10240,
|
||||
minRatio: 0.8,
|
||||
deleteOriginalAssets: false
|
||||
})
|
||||
]
|
||||
},
|
||||
// 默认设置: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-service/lib/config/base.js
|
||||
chainWebpack: config => {
|
||||
/**
|
||||
@@ -102,6 +116,8 @@ module.exports = {
|
||||
.end()
|
||||
}
|
||||
},
|
||||
// 不输出 map 文件
|
||||
productionSourceMap: false,
|
||||
// i18n
|
||||
pluginOptions: {
|
||||
i18n: {
|
||||
|
||||
Reference in New Issue
Block a user