1234567891011121314151617181920212223242526 |
- 'use strict'
- const path = require('path')
- const port = process.env.port || process.env.npm_config_port || 9527 // dev port
- module.exports = {
- publicPath: '/',
- 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" : {
- "/api" : {
- "target" : "http://tianli.liuniu946.com/api", //请求的目标域名
- "changeOrigin" : true,
- // "secure": false,
- "pathRewrite" : {'^/api': ''}
- }
- }
- }
- }
|