Skip to content

fix: use fileURLToPath for Windows-compatible __dirname and extract m…#83

Open
jafin wants to merge 1 commit intoloilo:mainfrom
jafin:fix/windows-build-paths
Open

fix: use fileURLToPath for Windows-compatible __dirname and extract m…#83
jafin wants to merge 1 commit intoloilo:mainfrom
jafin:fix/windows-build-paths

Conversation

@jafin
Copy link

@jafin jafin commented Mar 19, 2026

Summary

  • Replaces new URL('.', import.meta.url).pathname with fileURLToPath(new URL('.', import.meta.url)) across pack.ts, vite.base.config.ts, and both rolldown background configs on Windows the
    .pathname approach returns /D:/... with a leading slash that breaks resolve()
  • Extracts the inline node -e manifest build commands from package.json into a standalone build-manifest.ts script to avoid shell quoting issues on Windows

Should resolve #82

…anifest build script

On Windows, `new URL('.', import.meta.url).pathname` returns a path with
a leading slash (e.g. `/D:/...`) which breaks `resolve()`. Using
`fileURLToPath()` produces a correct platform path. Also extracts the
inline manifest build command to a standalone script to avoid shell
quoting issues on Windows.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

[Feature] Allow building on Windows

1 participant