chore: configure landing base path

This commit is contained in:
2026-07-10 09:42:25 +08:00
parent 6b7135a7c8
commit ecbdffcea4
3 changed files with 14 additions and 8 deletions
+1
View File
@@ -0,0 +1 @@
VITE_BASE_PATH=/
+1 -1
View File
@@ -2,7 +2,7 @@
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/favicon.png" />
<link rel="icon" type="image/png" href="%BASE_URL%favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
+12 -7
View File
@@ -1,12 +1,17 @@
import { defineConfig } from "vite";
import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), tailwindcss()],
server: {
port: 5273,
open: true,
},
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, ".", "");
return {
base: env.VITE_BASE_PATH || "/",
plugins: [react(), tailwindcss()],
server: {
port: 5273,
open: true,
},
};
});