perf: reduce install size and prepare 5.0.2 - #57
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Installing the sheet currently pulls in roughly 9.2 MB of Motion packages to animate a single numeric value. Bundle Motion’s existing spring generator and duration calculation with a small animation-frame driver, making Motion a development dependency and leaving React/React DOM as peers.
The resulting package is approximately 322 KB unpacked including source maps, versus the reported 9.8 MB installation. ESM JavaScript is 10.4 KB gzip including the spring implementation. Public APIs, CSS, spring settings, and reduced-motion behavior are preserved. Cancellation suppresses stale completion callbacks.
Adds numerical comparisons against Motion’s existing engine, lifecycle tests, a 450 KB package budget, clean-install checks requiring no Motion packages, and the bundled MIT notice. Updates the website’s generated size evidence.
Validation:
npm run release:checkpasses on currentmainplus this change, including 214 unit tests and the production website build.34335422276). This resolves the local macOS WebKit setup limitation.Preview review: try opening/closing, rapid reversal, drag-to-snap/flicks, backdrop continuity, and reduced motion. Detailed measurements and maintenance notes are in
docs/motion-size-audit.md.Release preparation: bump to unused patch version
5.0.2, update the changelog, and regenerate website version evidence. Publication will use the protected Release workflow after merge.