Commit 2a1b3d0
committed
fix(build): use fileURLToPath for cross-platform path comparison in esbuild
The esbuild config was comparing import.meta.url directly with process.argv[1]
to detect direct invocation. On Windows, this comparison always failed because:
- import.meta.url: `file:///D:/path/to/file.mjs` (forward slashes, triple slash)
- process.argv[1]: `D:\path\to\file.mjs` (backslashes)
This caused the build() function to never run on Windows. The script would
just export the config and exit with code 0, which is why the build reported
success without creating any files.
Fix: Use fileURLToPath(import.meta.url) to normalize the URL to a file path
that matches process.argv[1] on all platforms.
This was the root cause of all Windows CI failures - the build wasn't actually
running, so no dist/cli.js was created, causing ~180 tests to fail.1 parent 3f2b050 commit 2a1b3d0
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
| 374 | + | |
| 375 | + | |
375 | 376 | | |
376 | 377 | | |
377 | 378 | | |
| |||
0 commit comments