Commit 4b95cc3
committed
fix(pfe-tools): use WDS plugin for TS redirect instead of koa middleware
The liveReloadTsChangesMiddleware ran as koa middleware, which executes
AFTER WDS static file serving (koa-send). When a .js file didn't exist
on disk, koa-send returned 404 before the middleware could redirect to
the .ts source.
Convert to a WDS plugin with a serve hook, which runs BEFORE static
file resolution. This fixes 404 errors for elements that only have .ts
source files (no pre-compiled .js).
Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 2914145 commit 4b95cc3
1 file changed
Lines changed: 16 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
107 | 101 | | |
108 | 102 | | |
109 | 103 | | |
| |||
124 | 118 | | |
125 | 119 | | |
126 | 120 | | |
127 | | - | |
128 | 121 | | |
129 | 122 | | |
130 | 123 | | |
131 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
132 | 128 | | |
133 | 129 | | |
134 | 130 | | |
| |||
0 commit comments