Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce bundle size #1697
base: master
Are you sure you want to change the base?
Reduce bundle size #1697
Changes from 9 commits
bfc1f0f
54a9286
e3f0279
c49bafb
859d3d9
9973270
bb778cb
63db0b1
fb671dc
eba5b39
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify the new file path aligns with the export split.
The file check has been updated from
ReactOnRails.js
toReactOnRails.full.js
, which aligns with the PR's objective of splitting exports. However, let's verify that this is the correct path after the migration.Also applies to: 30-30
🏁 Script executed:
Length of output: 200
Missing File: Expected "ReactOnRails.full.js" Was Not Found
Our verification check indicates that the file at
node_package/lib/ReactOnRails.full.js
is missing from the repository. This is a concern because the update in the package-scripts expects this file to be generated or present to align with the export split changes. Please review the build process or file generation steps to ensure that the new file is correctly produced and referenced.node_package/lib/ReactOnRails.full.js
does not exist.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's autogenerated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Romex91 Understood, thank you for the clarification.
✏️ Learnings added
If you found this review helpful, would you consider giving us a shout-out on X?
Thank you for using CodeRabbit!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
LGTM! Effective bundle size optimization.
The separation of client and server exports effectively prevents server-rendering code from being included in the browser bundle, supporting the 14KB size reduction goal.
Run this script to verify the export paths:
🏁 Script executed:
Length of output: 812
Attention: Missing Export Files
It appears that the export paths in
package.json
(lines 8-11) reference files:node_package/lib/ReactOnRails.node.js
node_package/lib/ReactOnRails.full.js
node_package/lib/ReactOnRails.client.js
However, the verification script indicates that these files are missing. Please verify whether:
package.json
need to be updated to match the actual file locations.This review comment cannot be approved until the discrepancy is resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even Node 14 has
es2020
, so that should definitely be safe.Anyone running an older Node is also not going to upgrade this before upgrading Node, I think :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done