You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix upload-assets endpoint duplicating bundles across directories (#2768)
Fix upload-assets endpoint duplicating bundles across directories
The /upload-assets endpoint treated all uploaded files as a flat list and
copied every file into every target bundle directory. When RSC support
sends both server and RSC bundles, each bundle JS was duplicated in the
other's directory.
- Extract shared `extractBundlesAndAssets` helper that parses form body
into bundles (bundle_<hash> keys) and shared assets, used by both the
render and /upload-assets endpoints
- Rewrite /upload-assets to reuse `handleNewBundlesProvided` from the
render path, ensuring each bundle goes only to its own directory while
shared assets are distributed to all directories
- Always copy assets even when the bundle already exists (EEXIST),
fixing the case where re-running the rake task skipped asset writes
- Keep sending targetBundles from Ruby for backward compatibility with
older node renderers; added TODO to remove at next breaking version
- Rename renderingRequest to requestContext in bundle handler functions
- Warn on empty bundle_ hash suffix instead of silently skipping
Closes#2766
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,10 @@ After a release, run `/update-changelog` in Claude Code to analyze commits, writ
24
24
25
25
### [Unreleased]
26
26
27
+
#### Fixed
28
+
29
+
-**[Pro] Fixed bundle duplication in remote node renderer asset uploads**: When RSC support is enabled, running `rake react_on_rails_pro:copy_assets_to_remote_vm_renderer` no longer duplicates bundle JS files across bundle directories. Previously, both the server bundle and RSC bundle were copied into every target directory; now each bundle is placed only in its own directory while shared assets (manifests, stats) are correctly distributed to all. [PR 2768](https://github.com/shakacode/react_on_rails/pull/2768) by [AbanoubGhadban](https://github.com/AbanoubGhadban). Fixes [Issue 2766](https://github.com/shakacode/react_on_rails/issues/2766).
0 commit comments