-
Notifications
You must be signed in to change notification settings - Fork 7
/
vue.config.js
72 lines (72 loc) · 1.83 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
// vue.config.js
module.exports = {
publicPath: "",
assetsDir: "",
lintOnSave: true,
pages: {
index: {
entry: "src/apps/popup/Popup.ts",
template: "public/index.html",
filename: "popup.html",
title: "Jelly-Party App",
},
IFrame: {
entry: "src/apps/sidebar/Vue-IFrame/Vue-IFrame.ts",
template: "public/index.html",
filename: "iframe.html",
title: "Jelly-Party IFrame",
},
Join: {
entry: "src/apps/join/Join.ts",
template: "public/index.html",
filename: "join.html",
title: "Jelly-Party Join",
},
},
pluginOptions: {
webpackBundleAnalyzer: {
openAnalyzer: false,
},
},
filenameHashing: false,
configureWebpack: {
entry: {
background: "./src/background/Background.ts",
sidebar: "./src/apps/sidebar/Sidebar.ts",
rootStyles: "./src/assets/styles/RootStyles.scss",
},
devtool: ["development", "staging"].includes(process.env.NODE_ENV)
? "source-map"
: "",
// TODO: see https://github.com/webpack/webpack/issues/1625
// output: {
// library: "beta",
// libraryTarget: "var"
// }
},
chainWebpack: config => {
config.optimization.splitChunks(false);
const svgRule = config.module.rule("svg");
svgRule.uses.clear();
svgRule
.use("babel-loader")
.loader("babel-loader")
.end()
.use("vue-svg-loader")
.loader("vue-svg-loader");
config.module
.rule("images")
.use("url-loader")
.loader("url-loader")
.tap(options => Object.assign(options, { limit: 100240 }));
},
// TODO: Look into webpack's side effects: https://github.com/vuejs/vue-cli/issues/1287
css: {
loaderOptions: {
sass: {
prependData: `@import "~@/assets/styles/_variables.scss";`,
},
},
extract: false,
},
};