-
Notifications
You must be signed in to change notification settings - Fork 49.3k
Closed
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug
Description
React version:
use-sync-external-store 1.0.0, 1.1.0
Steps To Reproduce
- open up chrome dev tools
>>> var x = await import("https://cdn.skypack.dev/use-sync-external-store")
>>> x.useSyncExternalStore
undefined
Link to code example:
See above code snippet
I was trying to hack around with valtio
and if I do
import valtio from "https://cdn.skypack.dev/[email protected]";
or in the console
>>> var v = await import("https://cdn.skypack.dev/[email protected]")
Uncaught SyntaxError: The requested module '/-/[email protected]/dist=es2019,mode=imports/unoptimized/shim/index.js' does not provide an export named 'useSyncExternalStore'
The current behavior
the use-sync-external-store shim does not support esm
The expected behavior
please support esm
additional context
the bug was reported at valtio
pmndrs/valtio#452
An attempt was made to workaround the issue at their end
But the import
>>> var v = await import("https://cdn.skypack.dev/[email protected]")
Still fails on the use-sync-external-store shim.
mcous, jeffdrumgod, tonyfromundefined, HansBrende, vicary and 5 moreigorkamyshev and tonyfromundefined
Metadata
Metadata
Assignees
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug