-
Notifications
You must be signed in to change notification settings - Fork 3
/
vue.config.js
36 lines (36 loc) · 1.04 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
const path = require('path')
module.exports = {
// publicPath: '/openlayers-vue', // 基本路径
publicPath: process.env.NODE_ENV === 'production' ? '' : '', // 基本路径
assetsDir: 'static', // 静态路径存放位置
outputDir: 'dist', // 打包时生成的生产环境构建文件的目录
productionSourceMap: false, // 打包时不保留 map 文件(有 map 文件可以知道代码报错位置)
configureWebpack: config => {
Object.assign(config, {
resolve: {
extensions: ['.js', '.vue', '.json', '.css'], // 文件优先解析后缀名顺序
// 别名配置
alias: {
'@': path.resolve(__dirname, './src')
},
plugins: []
}
})
},
devServer: {
open: true, // 自动打开浏览器
// host: 'localhost',
// port: 8080,
https: false,
hotOnly: false
// proxy: {
// '/': {
// target: '',
// changeOrigin: true,
// pathRewrite: {
// '^/': ''
// }
// }
// }
}
}