-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvue.config.js
46 lines (45 loc) · 1.22 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
const CopyWebpackPlugin = require('copy-webpack-plugin');
const resolve = dir => require('path').join(__dirname, dir);
module.exports = {
chainWebpack: config => {
config.resolve.alias
.set('@', resolve('src'))
.set('_c', resolve('src/components'))
.set('_u', resolve('src/utils'))
},
configureWebpack: {
module: {
rules: [
{
test: /\.less$/,
use: [
{
loader: 'less-loader',
options: { lessOptions: { javascriptEnabled: true } }
}
]
}
]
},
plugins: [
new CopyWebpackPlugin({
patterns: [
{
from: 'node_modules/mavon-editor/dist/highlightjs',
to: resolve('dist/highlightjs'), // 插件将会把文件导出于/dist/highlightjs之下
},
{
from: 'node_modules/mavon-editor/dist/markdown',
to: resolve('dist/markdown'), // 插件将会把文件导出于/dist/markdown之下
},
{
from: 'node_modules/mavon-editor/dist/katex', // 插件将会把文件导出
to: resolve('dist/katex')
}]
})
]
},
devServer: {
disableHostCheck: true
}
}