-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Provide a general summary of the issue here
use-sync-external-store@1.4.0 is CJS only. For case of pure ESM repository, during bundling (with tsdown, for example), the bundled code includes __require('react') and fail.
Update to 1.6.0 should address the issue.
🤔 Expected Behavior?
No crash on use in ESM environment
😯 Current Behavior
It crashes on certain bundling scenarios.
💁 Possible Solution
See above
🔦 Context
No response
🖥️ Steps to Reproduce
Repro is not included because it is complicated to do.
It involves bundling the code and then use it in another app.
For details, see facebook/react#24590
and the PR: facebook/react#25231
Version
1.14.0
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
macOS
🧢 Your Company/Team
Palo Alto Networks
🕷 Tracking Issue
No response
Metadata
Metadata
Assignees
Labels
No labels