zuozhengqing
2023-12-13 fe87d39adb4e995ccf96a45b142ae026c3cf5eae
vue.config.js
@@ -13,15 +13,25 @@
  productionSourceMap: false, // 如果你不需要生产环境的source map, 可以将其设置为false 以加速生产环境构建
  devServer: {
    proxy: {
      "/api": {
        // target: "http://192.168.20.118:8889", // http://192.168.20.119:8002 http://fai365.com:30150/
        // target: "http://192.168.20.120:8004",
        target: "http://192.168.20.119:8004", // http://192.168.20.119:8004 http://fai365.com:30150/
      "/api-s": {
        target: "http://192.168.20.119:8005", //
        // target:"http://fai365.com:9083",  //
        ws: true,
        changeOrigin: true
      }
      },
      "/api-wms": {
        target: "http://192.168.20.119:8005",
        // target:"http://fai365.com:9083",
        ws: true,
        changeOrigin: true
      },
      "/api/menu": {
        target: "http://192.168.20.119:8001",
         //注: 暂时使用====用戶权限,角色暂时用的环境
        //  target: "http://192.168.20.119:8011",
        ws: true,
        changeOrigin: true,
      },
    }
  },
  transpileDependencies: [
@@ -29,13 +39,13 @@
    "crypto-js",
    "sockjs-client"
  ],
  configureWebpack: (config) => {
  configureWebpack: () => {
    const configNew = {}
    if (process.env.NODE_ENV === "production") {
      configNew.externals = externals
      configNew.plugins = []
    } else if (process.env.NODE_ENV === "development") {
      console.log("development", config)
      // console.log("development", config)
    }
    return configNew
  },