Files
bun.sh/src
Claude Bot 7dc54c1cff Fix HTML imports using relative paths at nested routes in compiled executables
Fixes #23431

When HTML files were compiled into executables and served at different routes,
script and style tags used relative paths (e.g., `./chunk.js`), which failed
to load correctly from nested routes like `/foo/bar`.

The issue occurred because:
1. HTML chunks generated script tags with unique keys
2. These keys were replaced with file paths during bundling
3. The path replacement used relative paths when public_path was empty
4. Relative paths resolve differently depending on the URL path

The fix ensures that when compiling executables without a custom public_path,
HTML asset references use absolute paths (`/chunk.js` instead of `./chunk.js`).
This allows the HTML to be served at any route while correctly loading assets.

Changes:
- Modified `generateChunksInParallel.zig` to use "/" as public_path for compiled
  executables when no custom public_path is set
- Applied same fix to `writeOutputFilesToDisk.zig` for consistency
- Added regression test to verify fix
2025-10-10 05:21:06 +00:00
..
2025-10-09 06:30:35 -07:00
2025-10-06 05:39:22 -07:00
2025-10-07 01:49:19 -07:00
2025-10-08 18:34:57 -07:00
2025-10-06 05:39:22 -07:00
2025-09-09 20:41:10 -07:00
2025-10-04 02:17:55 -07:00
2025-07-29 19:35:46 -07:00
2025-09-30 05:26:32 -07:00
2025-10-06 20:03:46 -07:00
2025-10-03 17:13:22 -07:00
2025-09-09 20:41:10 -07:00
2025-10-06 05:39:22 -07:00
2025-09-30 05:26:32 -07:00
2025-09-11 23:29:53 -07:00
2025-09-09 20:41:10 -07:00
2025-10-03 17:13:22 -07:00
2025-09-09 20:41:10 -07:00