Commit d35902b
fix(webapp): preserve Vite source maps for library files without @/ imports
The apollon-alias-resolver load hook rewrites the library's `@/` imports (which
collide with the webapp's own `@/`). It previously intercepted every file under
library/ and returned `map: null`, discarding source maps for all of them. It
now only intercepts files that actually rewrite a `@/…` import; every other
library file falls through to Vite's native loader and keeps its source map (and
Fast Refresh). The rewrite logic is unchanged.
Verified: webapp build resolves `@/` (0 raw `@/` left, rewritten to absolute
paths), and a non-`@/` library component is served with both a source map and
React Fast Refresh.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 39c55d0 commit d35902b
1 file changed
Lines changed: 17 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| 38 | + | |
35 | 39 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
45 | | - | |
| 51 | + | |
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 55 | + | |
| 56 | + | |
53 | 57 | | |
54 | 58 | | |
55 | 59 | | |
| |||
0 commit comments