diff --git a/src/main.tsx b/src/main.tsx index f3d4107..e6db325 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -8,8 +8,6 @@ import App from "./App.tsx"; const convex = new ConvexReactClient(import.meta.env.VITE_CONVEX_URL as string); -console.log("Convex URL:", convex); - createRoot(document.getElementById("root")!).render( @@ -17,5 +15,5 @@ createRoot(document.getElementById("root")!).render( - , + ); diff --git a/wrangler.jsonc b/wrangler.jsonc index c2b5099..8cb97fe 100644 --- a/wrangler.jsonc +++ b/wrangler.jsonc @@ -2,7 +2,12 @@ "$schema": "node_modules/wrangler/config-schema.json", "name": "leakhub", // Workers Assets configuration - replaces Pages' pages_build_output_dir - "assets": { "directory": "./dist" }, + // "not_found_handling": "single-page-application" enables SPA routing + // so that /dashboard and other client-side routes serve index.html instead of 404 + "assets": { + "directory": "./dist", + "not_found_handling": "single-page-application", + }, // Required compatibility date for Workers runtime features "compatibility_date": "2025-06-05", }