-
Notifications
You must be signed in to change notification settings - Fork 63
/
vue.config.js
45 lines (40 loc) · 938 Bytes
/
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
const path = require("path");
const isProd = process.env.NODE_ENV !== "production";
module.exports = {
lintOnSave: isProd,
outputDir: "./docs/dist",
publicPath: isProd ? "./" : "./dist/",
indexPath: "../index.html",
configureWebpack: {
entry: {
app: path.resolve(__dirname, "./docs/main.js")
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./docs")
}
},
performance: {
maxEntrypointSize: 1000000,
maxAssetSize: 1000000
}
},
chainWebpack: config => {
config.module.rule("js").include.add(path.resolve(__dirname, "./docs"));
config.module
.rule("vue")
.use("vue-loader")
.loader("vue-loader")
.tap(options => {
options.compilerOptions.preserveWhitespace = true;
return options;
});
},
css: {
loaderOptions: {
sass: {
data: `@import "~@/assets/index.scss";`
}
}
}
};