React 19 + Vite 6 + Router 7 + TanStack Query + Zustand;Semi 二次封装与 Remix 图标统一出口;顶部模块 + 左侧功能菜单布局、Cloud Blue 主题、登录页与 401/403/404/500 页面;请求层含 token 注入、单飞刷新与统一错误提示。
28 lines
499 B
TypeScript
28 lines
499 B
TypeScript
import { fileURLToPath, URL } from 'node:url';
|
|
|
|
import react from '@vitejs/plugin-react';
|
|
import { defineConfig } from 'vite';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
},
|
|
server: {
|
|
host: '127.0.0.1',
|
|
port: 5173,
|
|
strictPort: true,
|
|
},
|
|
preview: {
|
|
host: '127.0.0.1',
|
|
port: 4173,
|
|
strictPort: true,
|
|
},
|
|
build: {
|
|
target: 'es2022',
|
|
sourcemap: true,
|
|
},
|
|
});
|