-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvue.config.js
More file actions
45 lines (45 loc) · 1.17 KB
/
vue.config.js
File metadata and controls
45 lines (45 loc) · 1.17 KB
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
// eslint-disable-next-line @typescript-eslint/no-var-requires
const CopyWebpackPlugin = require('copy-webpack-plugin')
// eslint-disable-next-line @typescript-eslint/no-var-requires
const webpack = require('webpack')
module.exports = {
filenameHashing: false,
productionSourceMap: false,
pages: {
ctlPage: {
entry: 'src/ctlPage/main.ts',
filename: 'ctlPage/index.html'
},
popup: {
entry: 'src/popup/main.ts',
filename: 'popup/popup.html'
},
devtools: {
entry: 'src/devtools/initDevtools.ts',
filename: 'devtools/initDevtools.html'
}
},
configureWebpack: {
entry: {
background: './src/background/background.ts',
contentjs: './src/contentInject/contentjs.ts'
},
output: {
filename: 'js/[name].js'
},
plugins: [
new CopyWebpackPlugin([{
from: './src/manifest.json',
to: 'manifest.json'
}]),
new webpack.DefinePlugin({
global: 'window'
})
]
},
// 这儿删除不要生成chunk-vendors.js
chainWebpack: (config) => {
config.optimization.delete('splitChunks')
config.performance.maxEntrypointSize(4000000).maxAssetSize(4000000)
}
}