回退多余的配置

dev
suixy 2 months ago
parent b9de90424d
commit 9530bee1de

@ -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), '')
}
}

Loading…
Cancel
Save