diff --git a/vite.config.ts b/vite.config.ts index fe8bfc2..50e2ccf 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,5 +1,4 @@ import { defineConfig, loadEnv } from 'vite'; -import basicSsl from '@vitejs/plugin-basic-ssl'; import createPlugins from './vite/plugins'; import autoprefixer from 'autoprefixer'; // css自动添加兼容性前缀 import path from 'path'; @@ -18,18 +17,16 @@ export default defineConfig(({ mode, command }) => { extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'] }, // https://cn.vitejs.dev/config/#resolve-extensions - plugins: [createPlugins(env, command === 'build'), basicSsl()], + plugins: createPlugins(env, command === 'build'), server: { host: '0.0.0.0', - https: true, port: Number(env.VITE_APP_PORT), open: true, proxy: { [env.VITE_APP_BASE_API]: { - target: 'https://frp-off.com:47543', + target: 'http://localhost:8080', changeOrigin: true, ws: true, - secure: false, rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '') } }