-
Notifications
You must be signed in to change notification settings - Fork 1
/
vue.config.js
49 lines (46 loc) · 1.14 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
const { join } = require('path')
const resolve = filepath => join(__dirname, filepath)
module.exports = {
pages: {
popup: {
template: 'public/browser-extension.html',
entry: './src/popup/main.js',
title: 'Popup'
}
},
pluginOptions: {
browserExtension: {
componentOptions: {
background: {
entry: 'src/background.js'
},
contentScripts: {
entries: {
'content-script': [
'src/content-scripts/content-script.js'
]
}
}
}
}
},
chainWebpack: config => {
// Resource loader configuration:
// 4 named rules must include this loader
['vue', 'vue-modules', 'normal', 'normal-modules'].forEach(rule => {
config.module.rule('scss')
.oneOf(rule)
.use('sass-resources-loader')
.loader('sass-resources-loader')
.options({
resources: [
resolve('src/popup/utils/_settings.scss')
]
})
})
// Aliases configuration
config.resolve.alias
.set('node_modules', resolve('node_modules'))
.set('__STATIC__', 'static')
}
}