Commit 64434e6
committed
Fix sql-wasm.wasm 404 on GitHub Pages by patching absolute locateFile path
@cashapp/sqldelight-sqljs-worker bundles sql.js with a hardcoded
locateFile: file => "/sql-wasm.wasm", which resolves against the site
root instead of the /PeopleInSpace/ project-page subpath and 404s.
GitHub then serves its 404 HTML page in place of the wasm binary,
which the loader can't parse ("expected magic word... found <!DO"),
leaving the app stuck on "Loading astronauts...". Patch the built
chunk to use a relative path so it resolves correctly regardless of
the deployment subpath. Verified locally by serving the patched dist
output under a /PeopleInSpace/ subpath.1 parent 74e9725 commit 64434e6
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
| |||
0 commit comments