Replace React with Preact via compat layer - #1356
Open
captbaritone wants to merge 4 commits into
Open
Conversation
Alias react/react-dom to preact/compat in both the Rollup build config and the Vite dev server config. This reduces the gzipped bundle size by ~17% (main bundle) to ~25% (lazy bundle). Fixes Balance and Volume sliders to use onInput instead of onChange, since Preact uses native DOM event semantics where onChange only fires on commit. Extracts snapBalance() helper and forces DOM value sync during drag to preserve the center-snap behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✅ Deploy Preview for tourmaline-kringle-c98715 canceled.
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Size Change: -96.4 kB (-19.68%) 🎉 Total Size: 393 kB 📦 View Changed
|
Restore original dependency order; only add preact and @rollup/plugin-alias in place. Remove unnecessary @preact/compat. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
Author
|
Deploy preview (demo site): https://deploy-preview-1356--ecstatic-poincare-fe4c13.netlify.app/ |
captbaritone
marked this pull request as ready for review
August 27, 2026 00:46
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.
Summary
react/react-domtopreact/compatin both Rollup (library build) and Vite (dev server)onInputinstead ofonChange(Preact uses native DOM semantics whereonChangeonly fires on commit, not during drag)snapBalance()helper and forces DOM value sync during drag to preserve center-snap behaviorBundle size impact
QA results
Manually tested against interaction audit checklist:
Test plan
🤖 Generated with Claude Code