打包配置

时间:2021-08-20 21:42:24   收藏:0   阅读:16
module.exports ={
    lintOnSave:false,
    outputDir:‘dist‘,
    assetsDir:‘static‘,
    productionSourceMap:false,
    publicPath:‘./‘ ,
    devServer:{
        open:true,
        host:‘0.0.0.0‘,
        port:8081,
        hotOnly:false,
        proxy:{
            ‘/api‘:{
                //服务器端接口地址
                target:‘http://192.168.0.177:8081‘,
                //
                ws:true,
                //是否跨域
                changeOrigin:true,
                pathRewrite:{
                    ‘^/api‘:‘‘
                }
            }
        }
    }
}

 

原文:https://www.cnblogs.com/zjxzhj/p/14557437.html

评论(0)
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!