-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
54 lines (53 loc) · 1.09 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
// const devConfig = require('./dev/index.js')
// const path = require('path')
const path = require('path')
function resolve(dir) {
return path.join(__dirname, dir)
}
module.exports = {
publicPath: '/vue3-next-ts', // 部署到github page
outputDir: 'docs',
devServer: {
open: true,
overlay: {
warnings: false,
errors: true
},
proxy: {
'/': {
target: 'http://localhost:4000',
changeOrigin: true,
secure: false,
pathRewrite: {
'^/': '/'
}
}
}
},
configureWebpack: {
module: {
rules: [
{
test: /\.mjs$/,
include: /node_modules/,
type: 'javascript/auto'
}
]
}
},
chainWebpack: (config) => {
config.resolve.alias.set('@', resolve('src'))
config['externals'] = {
AMap: 'AMap' // 高德地图配置
}
},
pluginOptions: {
'style-resources-loader': {
preProcessor: 'less',
patterns: [
//这个是加上自己的路径,
path.resolve(__dirname, './src/assets/less/theme.less')
]
}
}
}