Remove CLI Check for Bundle Size, Rely on Server #1614
Merged
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.
WHY are these changes introduced?
When pushing a deployment that is too large, there is no way to track this in the admin or know what happened outside of the CLI feedback. We are looking to improve error messaging to better understand what has going wrong when a bundle size is greater than 10mb.
WHAT is this pull request doing?
I am removing the 10mb check on the CLI so that bundles that are too large create a deployment in the admin. The error messaging will now also available inside the admin on the deployment since there is a new record created.
We've added a server-side check prior to ensure there is still an error message being shown when running the CLI command.
HOW to test your changes?
Run
npx shopify hydrogen deploy
to create a deployment that is larger than 10mb and see error message back and that it shows up in the admin.Also see it work normally when the bundle size is <10mb.
A warning should continue to show when >5mb and <10mb.
Happy to demo on a call.
Checklist