web: React18+TDesign 网页控制台(登录/工作台/素材/账号/任务/审核/挑战/通知/审计/成员/设置/admin)

This commit is contained in:
Qiufeng
2026-08-20 20:38:21 +08:00
parent cc8845dcec
commit 33b7d57498
131 changed files with 15279 additions and 0 deletions
+62
View File
@@ -0,0 +1,62 @@
import path from 'path';
import { loadEnv } from 'vite';
import react from '@vitejs/plugin-react';
import svgr from '@honkhonk/vite-plugin-svgr';
const CWD = process.cwd();
export default (params) => {
const { mode } = params;
const { VITE_BASE_URL } = loadEnv(mode, CWD);
return {
base: VITE_BASE_URL,
resolve: {
alias: {
assets: path.resolve(__dirname, './src/assets'),
components: path.resolve(__dirname, './src/components'),
constants: path.resolve(__dirname, './src/constants'),
configs: path.resolve(__dirname, './src/configs'),
layouts: path.resolve(__dirname, './src/layouts'),
modules: path.resolve(__dirname, './src/modules'),
pages: path.resolve(__dirname, './src/pages'),
styles: path.resolve(__dirname, './src/styles'),
utils: path.resolve(__dirname, './src/utils'),
services: path.resolve(__dirname, './src/services'),
router: path.resolve(__dirname, './src/router'),
hooks: path.resolve(__dirname, './src/hooks'),
types: path.resolve(__dirname, './src/types'),
},
},
css: {
preprocessorOptions: {
less: {
modifyVars: {},
},
},
},
plugins: [svgr(), react()],
build: {
cssCodeSplit: false,
},
server: {
host: '0.0.0.0',
port: 3003,
proxy: {
'/api': {
target: 'http://127.0.0.1:8090',
changeOrigin: true,
},
'/health': {
target: 'http://127.0.0.1:8090',
changeOrigin: true,
},
'/ws': {
target: 'ws://127.0.0.1:8090',
ws: true,
changeOrigin: true,
},
},
},
};
};