Version Packages - #162
Merged
Merged
Conversation
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
material-theme-builder@3.0.0
Major Changes
d7ab3f0: Breaking: the React bindings moved to
material-theme-builder/react. Thepackage root now holds
builderalone.Migration
Change the import path for
Mcu,useMcuandExportButton:builderis unchanged — it stays on the root:Both can be mixed freely; importing from each entry in the same file is fine.
material-theme-builder/tailwind.cssand the CLI are untouched. The root alsonow exports the
McuConfigtype, which was previously unreachable.Why
2.2.0 made
buildercallable from a server component, but not free. The rootentry re-exported the React components, and a framework that splits server and
client graphs registers every export of a
"use client"module it reaches —re-export included, and tree-shaking can't undo it. So this:
still shipped
Mcuand the color utilities to the browser in a servercomponent that never renders
<Mcu>.Measured on a Next
output: "export"app whose layout does nothing but callbuilder(...).toCss()and render it into a<style>, same app source on bothsides, only the package shape differing:
tonalSpotin them−32 036 bytes gzip, byte-identical output. The saving exceeds what
dist/react.jsweighs on its own (26 184 gzip) because dropping it alsocollapses a whole chunk.
A subpath for the React-free half would have fixed the bundle while leaving the
default import the expensive one: you'd have to know about client-reference
registration to reach for it. Putting the framework-agnostic core at the root
and the bindings behind
/reactmakes the cheap path the default, and matcheshow the ecosystem splits this elsewhere (
motion/motion/react,@floating-ui/dom/@floating-ui/react).