-
-
Notifications
You must be signed in to change notification settings - Fork 757
/
Copy pathvue.config.js
55 lines (50 loc) · 1.69 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
const OpenBrowserPlugin = require("open-browser-webpack-plugin");
const path = require("path");
const PORT = 8111;
module.exports = {
// 发布资源文件引用方式
publicPath: "./",
devServer: {
port: PORT,
},
transpileDependencies: ["highlight.js"],
runtimeCompiler: true,
configureWebpack: (config) => {
return {
devtool: "source-map",
module: {
rules: [
{
test: /\.md$/,
use: [
{
loader: "vue-loader",
options: {
compilerOptions: {
preserveWhitespace: false,
},
},
},
{
loader: path.resolve(
__dirname,
//`./build/md-loader/index.js?v=${new Date().getTime()}` // disable loader cache.
`./build/md-loader/index.js`, // disable loader cache.
),
},
],
},
],
},
resolve: {
alias: {
// 需要和组件库 alias 名称一致
"vue-easytable": path.resolve(__dirname, "../"),
},
},
plugins: [
new OpenBrowserPlugin({ url: `http://localhost:${PORT}` }),
],
};
},
};