chore: vite 构建产物使用相对路径 (base: "./")

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
吉鑫升andClaude Opus 4.7 committed 2026-05-19 16:28:29 +08:00
1 parent bd1efd8026
commit 87fcbc5bfb
1 file changed
+8 -7
+8 -7
View File
@@ -1,13 +1,13 @@
import path from "node:path";
import { fileURLToPath } from "node:url";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import path from "node:path";
import { fileURLToPath } from "node:url";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
const rootDir = fileURLToPath(new URL(".", import.meta.url));
export default defineConfig({
plugins: [react()],
export default defineConfig({
plugins: [react()],
resolve: {
alias: [
{
@@ -32,6 +32,7 @@ export default defineConfig({
},
],
},
"base":"./",
server: {
port: 5173,
},