From 28a3872ca618116defb0ce93ccb4389cf99df516 Mon Sep 17 00:00:00 2001 From: suixy <2277317060@qq.com> Date: Fri, 24 Oct 2025 09:02:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=BC=E5=AE=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vite.config.ts | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 2330f8b..a751266 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,14 +1,9 @@ -import { ConfigEnv, defineConfig, loadEnv, UserConfig } from 'vite'; -import basicSsl from '@vitejs/plugin-basic-ssl'; -import Icons from 'unplugin-icons/vite'; -import IconsResolver from 'unplugin-icons/resolver'; -import Components from 'unplugin-vue-components/vite'; +import { UserConfig, ConfigEnv, loadEnv, defineConfig } from 'vite'; import createPlugins from './vite/plugins'; import path from 'path'; - export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => { const env = loadEnv(mode, process.cwd()); return { @@ -24,30 +19,17 @@ export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => { extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'] }, // https://cn.vitejs.dev/config/#resolve-extensions - plugins: [createPlugins(env, command === 'build'), basicSsl(), - Components({ - resolvers: [ - IconsResolver({ - compiler: 'vue3' - }) - ] - }), - Icons({ - compiler: 'vue3' - })], + plugins: createPlugins(env, command === 'build'), server: { host: '0.0.0.0', port: Number(env.VITE_APP_PORT), - // https: true, open: true, proxy: { [env.VITE_APP_BASE_API]: { - // target: 'http://localhost:6080', - // target: 'https://frp-off.com:47543', - // target: 'http://192.168.100.102:6080', + target: 'http://localhost:6080', // target: 'http://192.168.100.100:6080', - // target: 'http://1.13.177.47:6080', - target: 'http://192.168.0.15:6080', + // target: 'http://192.168.137.1:6080', + // target: 'http://175.27.215.92:6080/prod-api', changeOrigin: true, ws: true, rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '') @@ -62,7 +44,6 @@ export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => { target: 'http://localhost:6083', changeOrigin: true, ws: true, - secure: false, rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '') }, '/deva-api': {