12345678910111213141516171819202122232425262728293031 |
- 'use strict'
- const path = require('path')
- const port = process.env.port || process.env.npm_config_port || 9527 // dev port
- const options = {
- publicPath: '/index',
- outputDir: 'dist',
- indexPath: process.env.NODE_ENV === 'development' ? 'mer.html' : 'index.html',
- lintOnSave: process.env.NODE_ENV === 'development',
- productionSourceMap: false,
- devServer: {
- port: port,
- open: true,
- overlay: {
- warnings: false,
- errors: true
- },
- "proxy": {
- "/apis": {
- "target": "http://wap.tianlicn.cn/apis", //请求的目标域名
- "changeOrigin": true,
- // "secure": false,
- "pathRewrite": {
- '^/apis': ''
- }
- }
- }
- }
- }
- process.env.BASE_URL = options.publicPath;
- module.exports = options
|