Repository navigation
Commit 59bafcf
committed
chore: remove the empty runtime-config file and its plumbing
public/config.js assigned an empty object to window.env and nothing ever
read it. Nothing in src, e2e, supabase, scripts, or any of the 58 static
pages references window.env or globalThis.env; the app reads Vite's
import.meta.env instead.
It was loaded as a blocking script in <head> on every page, so removing it
also drops one request from the critical path.
Removes the file and everything that existed only to serve it: the script
tag in index.html, the service-worker app-shell entry, the Vercel and nginx
no-cache rules, and the /config.js row in the deployment-config test.
Also drops a latent trap in nginx.conf. The JS/CSS caching block carried
if ($request_uri ~* "config\.js") { return 404; }
which matches on substring, so any hashed bundle whose URI contained
"config.js" would have 404'd. With the file gone the guard has nothing to
protect and is deleted rather than narrowed.
The service worker degrades safely either way: install uses
Promise.allSettled and only caches responses that are ok, so a missing
app-shell entry could never fail installation.
Verified: lint, typecheck, 924 unit tests, 121 edge tests, build, and 126
Chromium e2e tests pass. `nginx -t` passes against the real nginx:alpine
image with this config mounted, and the built dist/index.html contains no
config.js reference.1 parent c7d3437 commit 59bafcf
6 files changed
Lines changed: 2 additions & 28 deletions
File tree
- public
- src/test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 21 | + | |
27 | 22 | | |
28 | 23 | | |
29 | 24 | | |
| |||
84 | 79 | | |
85 | 80 | | |
86 | 81 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | 82 | | |
92 | 83 | | |
93 | 84 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | 87 | | |
97 | 88 | | |
98 | 89 | | |
| |||
0 commit comments