forked from li22401316/x-lab-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
42 lines (40 loc) · 1.33 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
'use strict'
const CopyPlugin = require('copy-webpack-plugin')
const path = require('path')
// 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: {
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')
}
]
})
]
}
}