Files
bun.sh/test/regression/issue
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-08-06 06:44:46 -07:00
2025-01-28 17:23:57 -08:00
2025-06-03 13:23:12 -07:00
2025-06-03 23:41:37 -07:00
2025-01-17 22:08:07 -08:00
2024-06-14 01:50:36 -07:00
2025-03-03 21:38:05 -08:00
2025-05-26 21:18:22 -07:00
2025-07-03 01:06:22 -07:00
2025-07-23 22:31:42 -07:00
2025-07-20 23:02:10 -07:00