Skip to content

v0.22.1 — externalize use-sync-external-store shim chain

Choose a tag to compare

@CinimoDY CinimoDY released this 02 May 23:24
· 47 commits to main since this release
ac7ec89

Patch fix for the bundler regression in 0.22.0.

Fixed

  • use-sync-external-store shim chain is now properly external. 0.22.0 inlined the CJS use-sync-external-store-shim.production.js into dist/index.es.js. Consumer Vite builds (dmnctech) refused the module — duplicated React-export wrapping inside an ESM bundle confuses strict ESM evaluation. The shim is a transitive dep of react-aria / react-stately. vite.config.ts external matcher now uses id.includes('use-sync-external-store') to catch both bare imports and Rolldown-resolved subpaths. Plus UMD globals: each subpath maps to the host React global (React 18+ exposes useSyncExternalStore natively).

Verified

  • dist/index.es.js: 349KB → 345KB. Single remaining reference is a single import statement deferred to the consumer's resolver.
  • 1028/1028 tests pass.

Full diff: v0.22.0...v0.22.1