Commit bc004da
committed
fix(pfe-tools): end-anchor TS redirect regex to avoid rewriting .js.map
The `.js` regex in `liveReloadTsChangesMiddleware` was not end-anchored,
so requests for `.js.map` (source maps) were matched and rewritten
to `.ts.map`, breaking source maps in the dev server.
End-anchor the regex (`\.js$`) and use a regex replacement so only
the final `.js` extension is rewritten to `.ts`.
Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 402b3b0 commit bc004da
1 file changed
Lines changed: 4 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 91 | + | |
100 | 92 | | |
101 | | - | |
102 | | - | |
103 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
104 | 96 | | |
105 | 97 | | |
106 | 98 | | |
| |||
0 commit comments