-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathvue.config.js
More file actions
45 lines (42 loc) · 1.08 KB
/
vue.config.js
File metadata and controls
45 lines (42 loc) · 1.08 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
module.exports = {
pages: {
options: {
entry: 'src/options.js',
template: 'public/options.html',
filename: 'options.html',
title: 'Options Page',
},
app: {
entry: 'src/extension.js',
template: 'public/index.html',
filename: 'app.html', // This file will be deleted, since our extension is a JS file we'll run on every page
title: 'App Page',
},
popup: {
entry: 'src/popup.js',
template: 'public/popup.html',
filename: 'popup.html',
title: 'Popup',
},
},
filenameHashing: false,
chainWebpack: (config) => {
// https://forum.vuejs.org/t/disable-code-splitting-in-vue-cli-3/36295/8
config.optimization.splitChunks(false);
// https://www.fabiofranchino.com/blog/inject-svg-in-dom-with-vue/
const svgRule = config.module.rule('svg');
svgRule.uses.clear();
svgRule
.use('vue-svg-loader')
.loader('vue-svg-loader');
},
css: {
loaderOptions: {
sass: {
data: `
@import "@/assets/styles/_design_system.scss";
`,
},
},
},
};