Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Support ESM for the use-sync-external-store shim #24590

Open
s-cork opened this issue May 20, 2022 · 6 comments · May be fixed by #26230
Open

Bug: Support ESM for the use-sync-external-store shim #24590

s-cork opened this issue May 20, 2022 · 6 comments · May be fixed by #26230
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@s-cork
Copy link

s-cork commented May 20, 2022

React version:
use-sync-external-store 1.0.0, 1.1.0

Steps To Reproduce

  1. 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/valtio@1.6.0";

or in the console

>>> var v = await import("https://cdn.skypack.dev/valtio@1.6.0")
Uncaught SyntaxError: The requested module '/-/use-sync-external-store@v1.0.0-ZzO0qn27iKOvDc2m57IV/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/valtio@1.6.1")
Still fails on the use-sync-external-store shim.

@s-cork s-cork added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label May 20, 2022
@brophdawg11
Copy link

Related - would it also be possible to provide a UMD build as well? We're looking to use this in the new version of react-router but having some trouble bundling our own UMD module without ESM or UMD support.

Copy link

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Resolution: Stale Automatically closed due to inactivity label Apr 10, 2024
@1EDExg0ffyXfTEqdIUAYNZGnCeajIxMWd2vaQeP

It has a PR, please merge

@github-actions github-actions bot removed the Resolution: Stale Automatically closed due to inactivity label Apr 11, 2024
@HansBrende
Copy link

It has in fact TWO PRs: #26230 and #25231

Copy link

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Resolution: Stale Automatically closed due to inactivity label Jul 18, 2024
@igorkamyshev
Copy link

Please stop closing issues with no real resolution.

@github-actions github-actions bot removed the Resolution: Stale Automatically closed due to inactivity label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants