'-'
zhangwei
4 天以前 ddbf9504fc5faf6764fffa4e9263a3ad927331d8
vite.config.ts
@@ -26,8 +26,8 @@
      // 本地跨域代理 https://cn.vitejs.dev/config/server-options.html#server-proxy
      proxy: {
        "/api": {
          // 这里填写后端地址
          target: "http://192.168.0.36:5005",
          // 这里填写后端地址http://114.132.78.38:8096 http://192.168.0.36:5005
          target: "http://192.168.18.52:5005",
          changeOrigin: true,
          rewrite: path => path.replace(/^\/api/, "")
        }
@@ -38,6 +38,14 @@
      }
    },
    plugins: getPluginsList(VITE_CDN, VITE_COMPRESSION),
    css: {
      preprocessorOptions: {
        scss: {
          // 自动导入定制化样式进行文件覆盖
          additionalData: `@use "@/style/element-plus-new.scss" as *;`
        }
      }
    },
    // https://cn.vitejs.dev/config/dep-optimization-options.html#dep-optimization-options
    optimizeDeps: {
      include,