Open x-yuri opened 2 years ago
I got similar issue with @mui/material
SyntaxError: The requested module '/-/react@v17.0.1-yH0aYV1FOvoIPeKBbHxg/dist=es2019,mode=imports/unoptimized/jsx-runtime.js' does not provide an export named 'jsx'
And I believe it's not only for mui
but for all packages that use the new jsx
https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html
Running into this as well.
I switched to https://esm.sh/ and it works like a charm, demo
Last time I checked it had issues.
I just tried your demo and:
I wrote a gist about CDNs. What's missing there is jspm
, which let me use mui
. I don't remember the reasons, but back then I came to conclusion that jspm
is the most promising CDN. At least, it took some while, but in the end they solved my issue. This one is still open.
@x-yuri That's because esm.sh upgrades again, I just updated my website, to make it work, you have to refresh again as it's using Service Worker to lock react version to avoid multi react instance
Indeed, now the demo works.
In the console I get:
With
unpkg.com
it works: