Browse Source

fix: 环境变量修改

赖奇 1 year ago
parent
commit
1c7ccd8878

+ 1 - 1
apps/web-ele/.env.development

@@ -4,7 +4,7 @@ VITE_PORT=5777
 VITE_BASE=/
 
 # 接口地址
-VITE_GLOB_API_URL=/api
+VITE_GLOB_API_URL=/dev-api
 
 # 是否开启 Nitro Mock服务,true 为开启,false 为关闭
 VITE_NITRO_MOCK=false

+ 1 - 1
apps/web-ele/.env.production

@@ -1,7 +1,7 @@
 VITE_BASE=/
 
 # 接口地址
-VITE_GLOB_API_URL=https://mock-napi.vben.pro/api
+VITE_GLOB_API_URL=/prod-api
 
 # 是否开启压缩,可以设置为 none, brotli, gzip
 VITE_COMPRESS=none

+ 0 - 4
apps/web-ele/components.d.ts

@@ -7,11 +7,7 @@ export {};
 /* prettier-ignore */
 declare module 'vue' {
   export interface GlobalComponents {
-    ElButton: typeof import('element-plus/es')['ElButton']
     RouterLink: typeof import('vue-router')['RouterLink']
     RouterView: typeof import('vue-router')['RouterView']
   }
-  export interface ComponentCustomProperties {
-    vLoading: typeof import('element-plus/es')['ElLoadingDirective']
-  }
 }

+ 2 - 2
apps/web-ele/vite.config.mts

@@ -32,9 +32,9 @@ export default defineConfig(async () => {
       },
       server: {
         proxy: {
-          '/api': {
+          '/dev-api': {
             changeOrigin: true,
-            rewrite: (path) => path.replace(/^\/api/, ''),
+            rewrite: (path) => path.replace(/^\/dev-api/, ''),
             // mock代理目标地址
             target: 'http://211.149.199.65:5012/',
             ws: true,

File diff suppressed because it is too large
+ 6 - 620
pnpm-lock.yaml


Some files were not shown because too many files changed in this diff