Repository navigation
Commit 82a279c
fix(nitro): Use forward slashes for resolved plugin paths on Windows
`createResolver` returned `node:path` results, so on Windows the server
plugin was registered as `C:\Users\...\runtime\plugins\server`. Nitro
writes plugin paths verbatim into the generated `#nitro/virtual/plugins`
module (`import _x from "<path>"`), where the backslashes are read as
escape sequences, so the import becomes `C:Users...` and both `vite dev`
and `vite build` fail with ERR_MODULE_NOT_FOUND / "failed to resolve
import". Nitro's own plugin paths come from `pathe` and are unaffected.
Normalize the resolved path to forward slashes, which resolve on every
platform.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>1 parent ec4931e commit 82a279c
2 files changed
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments