-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvue.config.js
51 lines (48 loc) · 1.46 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
'use strict'
const CopyPlugin = require('copy-webpack-plugin')
const path = require('path')
function resolve(dir) {
return path.join(__dirname, dir)
}
// All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = {
/**
* You will need to set publicPath if you plan to deploy your site under a sub path,
* for example GitHub Pages. If you plan to deploy your site to https://foo.github.io/bar/,
* then publicPath should be set to "/bar/".
* In most cases please use '/' !!!
* Detail: https://cli.vuejs.org/config/#publicpath
*/
publicPath: process.env.NODE_ENV === 'development' ? '/' : '/x-lab-web/',
// publicPath: process.env.NODE_ENV === 'development' ? '/' : '/',
filenameHashing: false,
outputDir: 'docs',
assetsDir: 'static',
lintOnSave: process.env.NODE_ENV === 'development',
productionSourceMap: false,
configureWebpack: {
resolve: {
alias: {
'@': resolve('src')
}
},
plugins: [
new CopyPlugin({
patterns: [
// {
// from: path.resolve(__dirname, './config'),
// to: path.resolve(__dirname, './docs/config')
// },
{
from: path.resolve(__dirname, './static'),
to: path.resolve(__dirname, './docs/static')
},
{
from: path.resolve(__dirname, './config'),
to: path.resolve(__dirname, './docs/config')
}
]
})
]
}
}