Added React 19 compability and Tree shaking support #40
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.
React 19 compatibility.
This resolves #38
It seems to be an RSPack issue — I couldn’t get React 19 working after compilation with the latest RSPack, though the same setup worked fine with Vite. The root cause is still unclear.
RsPack vs Vite
While RSPack is likely faster, Vite is currently more convenient:
A single configuration works for build, tests, and Storybook.
The package.json remains clean and minimal.
Tree shaking support
To make the library tree shakable, I added ES modules export.
Bonus
Upgraded to Storybook 9 😁
Added
packageManagerfield topackage.json.Since v16.13, Node.js is shipping Corepack for managing package managers. This is still an experimental feature, but it's a convenient one.
So new developers will just need to run
corepack enableto install correct yarn version. Personally, I prefer pnpm.