diff --git a/.changeset/fix-hmr-fast-refresh-minified-name.md b/.changeset/fix-hmr-fast-refresh-minified-name.md deleted file mode 100644 index 997da38..0000000 --- a/.changeset/fix-hmr-fast-refresh-minified-name.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"react-call": patch ---- - -Fix: Vite/React Fast Refresh no longer rejects a Callable as "incompatible" in the published build, so editing a Callable's own source while a call is open hot-updates in place instead of triggering a full reload that closes it ([ADR-0022](docs/adr/0022-pin-callable-name-for-fast-refresh.md), [#110](https://github.com/desko27/react-call/issues/110)). - -The minified bundle renamed the returned component's function to a lowercase identifier, which fails react-refresh's `isLikelyComponentType` name check — and because the truthy minified `name` shadows `displayName`, neither setting `displayName` manually nor the `react-call/vite` plugin could work around it. `createCallable` now pins an uppercase `name` on the Callable (dev-only; production output is byte-for-byte unchanged), restoring Fast Refresh acceptance for the artifact consumers actually install. diff --git a/packages/react-call/CHANGELOG.md b/packages/react-call/CHANGELOG.md index c9a56df..b970161 100644 --- a/packages/react-call/CHANGELOG.md +++ b/packages/react-call/CHANGELOG.md @@ -1,5 +1,13 @@ # react-call +## 2.0.2 + +### Patch Changes + +- 46a7013: Fix: Vite/React Fast Refresh no longer rejects a Callable as "incompatible" in the published build, so editing a Callable's own source while a call is open hot-updates in place instead of triggering a full reload that closes it ([ADR-0022](docs/adr/0022-pin-callable-name-for-fast-refresh.md), [#110](https://github.com/desko27/react-call/issues/110)). + + The minified bundle renamed the returned component's function to a lowercase identifier, which fails react-refresh's `isLikelyComponentType` name check — and because the truthy minified `name` shadows `displayName`, neither setting `displayName` manually nor the `react-call/vite` plugin could work around it. `createCallable` now pins an uppercase `name` on the Callable (dev-only; production output is byte-for-byte unchanged), restoring Fast Refresh acceptance for the artifact consumers actually install. + ## 2.0.1 ### Patch Changes diff --git a/packages/react-call/package.json b/packages/react-call/package.json index 3317339..5f428fb 100644 --- a/packages/react-call/package.json +++ b/packages/react-call/package.json @@ -1,6 +1,6 @@ { "name": "react-call", - "version": "2.0.1", + "version": "2.0.2", "description": "Call your React components", "repository": { "type": "git",