-
Notifications
You must be signed in to change notification settings - Fork 4
/
vue.config.js
67 lines (56 loc) · 1.43 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
module.exports = {
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
devServer: {
// writeToDisk: true, // https://webpack.js.org/configuration/dev-server/#devserverwritetodisk-
},
lintOnSave: false,
// transpileDependencies: [
// /\bkeen-ui\b/
// ],
css: {
loaderOptions: {
sass: {
additionalData: `@import '~@/scss/variables.scss';`,
},
},
},
parallel: false,
configureWebpack: config => {
config.node = {fs: "empty"};
},
chainWebpack: config => {
config.resolve.symlinks(false);
// config.module.rule('worker')
// .test(/\.worker\.js$/i)
// .use('worker-loader')
// .loader('worker-loader');
const MarkdownIt = require("markdown-it");
const md = new MarkdownIt({
html: true,
breaks: true,
});
config.module
.rule("md1")
.test(/\.md/)
.use("vue-loader")
.loader("vue-loader")
.end();
config.module
.rule("md2")
.test(/\.md/)
.use("ware-loader")
.loader("ware-loader")
// .enforce('pre')
.options({
raw: true,
middleware(source) {
return `<template><div>${md.render(source)}</div></template>`;
},
});
config.module
.rule("vue")
.use("vue-svg-inline-loader")
.loader("vue-svg-inline-loader")
.options({});
},
};