clear no use packages

This commit is contained in:
2025-03-26 23:13:18 +08:00
parent f2b850a9ea
commit a65cd7b4ce
4 changed files with 7 additions and 1994 deletions

View File

@@ -3,22 +3,16 @@ import react from '@vitejs/plugin-react';
import path from 'path';
import tailwindcss from '@tailwindcss/vite';
import pkgs from './package.json' with { type: 'json' };
import basicSsl from '@vitejs/plugin-basic-ssl';
const version = pkgs.version || '0.0.1';
const isDev = process.env.NODE_ENV === 'development';
const basename = isDev ? '/' : pkgs?.basename || '/';
const plugins = []
const isWeb = false;
if(isWeb) {
// 在bolt.new的页面没有ssl
plugins.push(basicSsl())
}
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), tailwindcss(), ...plugins],
plugins: [react(), tailwindcss()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
@@ -40,6 +34,8 @@ export default defineConfig({
'/api': {
target: 'http://localhost:3000',
changeOrigin: true,
ws: true,
rewriteWsOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '/api'),
},
'/api/router': {