首页 > 技术文章 > config配置

zjxzhj 2021-07-12 08:03 原文

module.exports ={
    lintOnSave:false,
    outputDir:'dist',
    assetsDir:'static',
    productionSourceMap:false,
    publicPath:'./' ,
    devServer:{
        open:true,
        host:'0.0.0.0',
        // port:8083,
        hotOnly:false,
        proxy:{
            // https://open.weixin.qq.com
            '/api':{
                //服务器端接口地址
                // target:'http://192.168.0.155:8081',
                target:'http://192.168.0.107:8083',
                // target:'http://h5.u2sy.cn',
                ws:true,
                //是否跨域
                changeOrigin:true,
                pathRewrite:{
                    '^/api':''
                }
            }
        }
    }
}

  

推荐阅读