Files
sweet/packages
Bartek IwańczukandClaude Opus 4.6 d6fc1d08a8 fix: normalize Windows paths in generated snapshot and server entry (#3727)
## Summary
- When building on Windows, `path.relative()` produces backslash
separators (`\`) that get hardcoded into the generated `snapshot.js` and
`server.js` files
- If the bundle is then deployed to a Linux server (e.g. Windows CI →
Linux prod), those paths break at runtime
- Fix: add a `toPosix()` helper that normalizes all paths written into
generated files to use forward slashes, applied in three places:
  - `root` path passed to `generateServerEntry()`
  - `filePath` in `prepareStaticFile()` (from `path.relative()`)
- All path options inside `generateServerEntry()` (root, serverEntry,
snapshotSpecifier)

Closes #3513

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 15:12:47 +02:00
..
2026-03-28 10:01:28 +01:00