美文网首页
2018-07-22

2018-07-22

作者: Gradlyarn | 来源:发表于2018-07-22 21:56 被阅读13次
    devServer: {
        host: HOST || config.dev.host,
        port: PORT || config.dev.port,
          ? { warnings: false, errors: true }
          : false,
        publicPath: config.dev.assetsPublicPath,
        proxy: config.dev.proxyTable,
        before(app){
          app.use('/api',router);
        }
      },
    
    proxyTable: {
          '/apis': {
            // 测试环境
            target: '127.0.0.1:8088',  // 接口域名
            changeOrigin: true,  //是否跨域
            pathRewrite: {
                '^/apis': ''   //需要rewrite重写的,
            }              
          }
    

    相关文章

      网友评论

          本文标题:2018-07-22

          本文链接:https://www.haomeiwen.com/subject/oamrmftx.html