From 8a0e936f813148230261cce49975af12204dd98d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Fri, 10 Jan 2025 08:44:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tsconfig.json | 5 +++-- vite.config.ts | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index bb287e9..9dfceca 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,7 @@ "target": "esnext", "module": "esnext", // "useDefineForClassFields": true, - "moduleResolution": "bundler", + "moduleResolution": "node", "strict": true, "jsx": "preserve", "strictNullChecks": false, @@ -17,7 +17,8 @@ "allowJs": true, "experimentalDecorators": true, "paths": { - "@/*": ["src/*"] + "@/*": ["src/*"], + "@": ["src"] }, "types": ["vite/client"], "skipLibCheck": true, diff --git a/vite.config.ts b/vite.config.ts index 68ea50a..885708f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -13,7 +13,7 @@ export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => { resolve: { alias: { '~': path.resolve(__dirname, './'), - '@': path.resolve(__dirname, './src') + '@': path.resolve(__dirname, 'src') }, extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'] }, @@ -26,6 +26,7 @@ export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => { proxy: { [env.VITE_APP_BASE_API]: { target: 'http://localhost:6080', + // target: 'http://192.168.137.1:6080', // target: 'http://175.27.215.92:6080/prod-api', changeOrigin: true, ws: true,