esm-dev / esm.sh

A fast, smart, & global CDN for modern(es2015+) web development.
https://esm.sh
MIT License
2.95k stars 143 forks source link

Failed to import - react@rc in development mode #847

Closed nicksrandall closed 6 days ago

nicksrandall commented 1 week ago

Failing module

esm.sh is not properly converting the react development package (written as CJS) to ESM. It only provides the default export and nothing else. I can change my code to switch to import * as React from 'react' but the issue is that many of my dependencies that use react to not do that so it still breaks.

Error message

After onload I got this:

Package does not export module `useEffect`. 

Additional info

ije commented 1 week ago

thanks for reporting! import { useEffect } from "https://esm.sh/react@rc" should work good, react 19 changed the development build. i will fix asap!

ije commented 1 week ago
Screenshot 2024-06-28 at 23 56 07
nicksrandall commented 3 days ago

@ije I'm not seeing this as fixed for the dev build (which is what this issue was specifically about). Has this change be deployed to esm.sh?

ije commented 2 days ago

Has this change be deployed to esm.sh?

nope, i will depoy soon