-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
106 lines (105 loc) · 3.27 KB
/
vue.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
var webpack = require('webpack');
var MangleJsClassPlugin = require('mangle-js-webpack-plugin');
var ZipPlugin = require('./src/zip.js');
module.exports = {
filenameHashing: false,
productionSourceMap: false,
lintOnSave: false,
pages: {
content: {
entry: 'src/content.ts',
filename: 'content.html'
},
background: {
entry: 'src/background.ts',
filename: 'background.html'
},
popup: {
entry: 'src/popup.ts',
filename: 'popup.html'
},
login: {
entry: 'src/login.ts',
filename: 'login.html'
},
settings: {
entry: 'src/settings.ts',
filename: 'settings.html'
},
worksheet: {
entry: 'src/worksheet.ts',
filename: 'worksheet.html'
},
register: {
entry: 'src/register.ts',
filename: 'register.html'
},
forget: {
entry: 'src/forget.ts',
filename: 'forget.html'
}
},
css: {
extract: true,
sourceMap: false,
loaderOptions: {},
modules: false
},
configureWebpack: {
optimization: {
//splitChunks: {
// chunks: 'all',
// //minSize: 30000,
// minChunks: 10,
// //maxAsyncRequests: 5,
// //maxInitialRequests: 3,
// //automaticNameDelimiter: '~',
// //name: true,
// //cacheGroups: {
// // jquery: {
// // name: `chunk-jquery`,
// // test: /[\\/]node_modules[\\/].*?jquery.*?/,
// // priority: -5,
// // chunks: 'initial'
// // },
// // vendors: {
// // name: `chunk-vendors`,
// // test: /[\\/]node_modules[\\/]/,
// // priority: -10,
// // chunks: 'initial'
// // },
// // utils: {
// // name: `chunk-utils`,
// // test: /.*src[\\/]core[\\/]message.*/,
// // priority: -15,
// // chunks: 'initial'
// // },
// // common: {
// // name: `chunk-common`,
// // priority: -20,
// // chunks: 'initial',
// // reuseExistingChunk: false
// // }
// //}
//}
splitChunks: false
},
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery"
})
//, new MangleJsClassPlugin({ //调试注释该部分
// exclude: /chunk-vendors.*/,
// algorithm: 'obfuscator' // 'obfuscator' || 'jjencode' || 'aaencode'
//})
//,new ZipPlugin({
// chrome: ["applications"]
//})
//new BundleAnalyzerPlugin()
]
}
,chainWebpack(webpackConfig) { //调试打开该部分
webpackConfig.optimization.minimize(false);
}
};