1
lzhe
2024-04-07 ea57d9c45a677c1875301e09ea6aa68c6d562f44
vue.config.js
@@ -1,6 +1,13 @@
/*
 * @Date: 2024-03-23 09:49:06
 * @LastEditors: lzhe lzhe@example.com
 * @LastEditTime: 2024-03-28 11:34:07
 * @FilePath: /cps-web/vue.config.js
 */
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
   lintOnSave: false,
   //设置为空打包后不分更目录还是多级目录
   publicPath:'',
   //build编译后存放静态文件的目录
@@ -19,7 +26,14 @@
            target: process.env.VUE_APP_API_BASEURL,
            ws: true,
            pathRewrite: {
               '^/api': '/'
               // '^/api': '/'
            }
         },
         '/myapi': {
            target: process.env.VUE_APP_API_MYBASEURL,
            ws: true,
            pathRewrite: {
               '^/myapi': '/'
            }
         }
      }