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': {