Skip to content

fix: normalize file paths in virtual modules for Windows#95

Merged
uhyo merged 1 commit intomasterfrom
fix/normalize-paths-in-virtual-modules
Mar 23, 2026
Merged

fix: normalize file paths in virtual modules for Windows#95
uhyo merged 1 commit intomasterfrom
fix/normalize-paths-in-virtual-modules

Conversation

@uhyo
Copy link
Owner

@uhyo uhyo commented Mar 23, 2026

Summary

  • Use Vite's normalizePath() to convert backslash path separators to forward slashes before embedding resolved paths in generated virtual module code
  • Fixes the Windows dev server error where backslashes in paths like C:\Users\... are interpreted as escape characters in JavaScript import statements

Closes #93

Test plan

  • pnpm build passes
  • pnpm typecheck passes
  • pnpm test:run — 30 unit tests pass
  • pnpm test:e2e — 19 e2e tests pass

🤖 Generated with Claude Code

…patibility

Use Vite's normalizePath() to convert backslashes to forward slashes
in resolved paths before embedding them in generated virtual module code.

Closes #93

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@uhyo uhyo merged commit 5ab586c into master Mar 23, 2026
2 checks passed
@uhyo uhyo deleted the fix/normalize-paths-in-virtual-modules branch March 23, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File paths embedded in generated files must be normalized

1 participant