From 42455b90ee00962c1f17d4b00aed376fb076e530 Mon Sep 17 00:00:00 2001 From: Conor Schaefer Date: Thu, 25 Jul 2024 09:11:07 -0700 Subject: [PATCH] fix: use cleanUrls in firebase config Sets `cleanUrls=true` in the Firebase config [0], to fix how subpage navigation works on the hosted site. I'm not stoked that we need to perform this kind of URL rewriting at the hosting layer; I'd prefer that the build step emitted a properly structured static docroot. Refs #8. [0] https://firebase.google.com/docs/hosting/full-config#control_html_extensions --- firebase.json | 1 + justfile | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/firebase.json b/firebase.json index 9dcaab6..3a0b0b2 100644 --- a/firebase.json +++ b/firebase.json @@ -1,6 +1,7 @@ { "hosting": { "public": "out", + "cleanUrls": true, "redirects": [ { "source": "/main/index.html", diff --git a/justfile b/justfile index de8c616..60a7ea3 100644 --- a/justfile +++ b/justfile @@ -9,3 +9,8 @@ build: # run dev env with livereload, for local editing dev: pnpm dev + +# run dev env via firebase, for a more prod-like local editing experience +firebase-dev: + @just build + firebase emulators:start