refactor: fix index.html path and vite config for correct build

This commit is contained in:
2025-06-04 11:08:33 +09:00
parent 4bc0c4ce7f
commit fff7de8184
2 changed files with 3 additions and 2 deletions

View File

@ -120,7 +120,7 @@ app.get("/", async (c) => {
// フォールバックとして index.html明示的なパス
app.get("/index.html", async (c) => {
const indexPath = path.join(frontendBuildDir, "server", "app", "index.html");
const indexPath = path.join(frontendBuildDir, "index.html");
const file = Bun.file(indexPath);
if (await file.exists()) {
console.log(`Serving index.html from ${indexPath}`);
@ -132,7 +132,7 @@ app.get("/index.html", async (c) => {
// その他のパスも index.html へフォールバック
app.get("*", async (c) => {
const indexPath = path.join(frontendBuildDir, "server", "app", "index.html");
const indexPath = path.join(frontendBuildDir, "index.html");
const file = Bun.file(indexPath);
if (await file.exists()) {
console.log(`Serving index.html from ${indexPath}`);