-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvue.config.js
More file actions
39 lines (37 loc) · 1.07 KB
/
vue.config.js
File metadata and controls
39 lines (37 loc) · 1.07 KB
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
module.exports = {
lintOnSave: true,
publicPath:'./',
productionSourceMap:false, // 设置上线后是否加载webpack文件
devServer: {
open: true, //是否自动弹出浏览器页面
host: "localhost",
port: '8080',
https: false,
hotOnly: false,
proxy: {
'/api': {
target: 'http://dev.cyrd.gdinsight.com', //API测试服务器的地址
changeOrigin: true,
pathRewrite: {'^/api': ''}
}
},
},
css: {
// 是否使用css分离插件 ExtractTextPlugin
extract: true,
// 开启 CSS source maps?
sourceMap: false,
// css预设器配置项
loaderOptions: {},
// 启用 CSS modules for all css / pre-processor files.
modules: false
},
chainWebpack: (config) => {
config.entry('main').add('babel-polyfill')
config.module
.rule('images')
.use('url-loader')
.loader('url-loader')
.tap(options => Object.assign(options, { limit: 50000 }))
}
}