File tree Expand file tree Collapse file tree
demo/vue_demo/textfsm_online Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ module.exports = {
88 '@vue/standard'
99 ] ,
1010 parserOptions : {
11- parser : '@babel/eslint-parser'
11+ parser : '@babel/eslint-parser' ,
12+ requireConfigFile : false
1213 } ,
1314 rules : {
1415 'no-console' : process . env . NODE_ENV === 'production' ? 'warn' : 'off' ,
Original file line number Diff line number Diff line change 11const { defineConfig } = require ( '@vue/cli-service' )
2- const CompressionWebpackPlugin = require ( 'compression-webpack-plugin' ) ; //引入插件
2+ const CompressionWebpackPlugin = require ( 'compression-webpack-plugin' ) // 引入插件
33module . exports = defineConfig ( {
44 transpileDependencies : true ,
55 productionSourceMap : false ,
66 configureWebpack : ( config ) => {
7- if ( process . env . NODE_ENV == 'production' ) {
8- // gzip 压缩
7+ if ( process . env . NODE_ENV === 'production' ) {
8+ // gzip 压缩
99 config . plugins . push ( new CompressionWebpackPlugin ( {
10- algorithm : 'gzip' ,
11- test : / \. j s $ | \. h t m l $ | \. j s o n $ | \. c s s / ,
12- threshold : 10240 , // 10k 以上文件压缩
13- minRatio : 0.8 ,
14- deleteOriginalAssets : false //不删除原文件
15- } ) ) ,
10+ algorithm : 'gzip' ,
11+ test : / \. j s $ | \. h t m l $ | \. j s o n $ | \. c s s / ,
12+ threshold : 10240 , // 10k 以上文件压缩
13+ minRatio : 0.8 ,
14+ deleteOriginalAssets : false // 不删除原文件
15+ } ) )
1616 config . externals = {
1717 vue : 'Vue'
1818 }
1919 }
20- }
20+ }
2121} )
You can’t perform that action at this time.
0 commit comments