feat: add landing page

This commit is contained in:
2026-06-12 06:58:06 +08:00
parent 050f2b74c3
commit 7fe3a0fc93
13 changed files with 3067 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';
function normalizeBasePath(value: string | undefined) {
const raw = value?.trim();
if (!raw || raw === '/') return '/';
if (raw === './') return './';
if (/^https?:\/\//.test(raw)) {
return raw.endsWith('/') ? raw : `${raw}/`;
}
return `/${raw.replace(/^\/+|\/+$/g, '')}/`;
}
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
return {
base: normalizeBasePath(env.VITE_BASE_PATH),
plugins: [react()],
};
});