vue-base-demo
Version:
vue base demo
29 lines (27 loc) • 948 B
JavaScript
// see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')
module.exports = {
projectRoot: path.resolve(__dirname, '../'),
build: {
index: path.resolve(__dirname, 'dist/index.html'),
assetsRoot: path.resolve(__dirname, 'dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
productionSourceMap: true
},
dev: {
// process.env.VCAP_APP_PORT NodeJS 应用需要使用 VCAP_APP_PORT 环境变量的值来确定 web 服务需要监听的端口
port: process.env.VCAP_APP_PORT || 80,
proxyTable: {
'/api/coding': {
target: 'https://coding.net', // target host
changeOrigin: true, // 必须true才能调到接口
ws: false, // proxy websockets
pathRewrite: {
'^/api/coding': '/', // rewrite path
},
logLevel: 'debug',
}
}
}
}