Repository navigation
Commit 6acb976
committed
fix(html): move router constants to ui/constants.mjs; keep node: imports out of browser bundle
constants.mjs imports node:path and node:url, which break when bundled for
the browser. The ROUTER_* constants added in da720ce pulled those Node.js
builtins into the client bundle, silently preventing startRouter from loading
and causing every client-side navigation to fall back to a full page reload.
Move the constants to packages/react/src/html/ui/constants.mjs (browser-only
code) and remove their exports from the Node.js-side constants.mjs.
Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent feb4a6e commit 6acb976
3 files changed
Lines changed: 9 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
0 commit comments