-
Notifications
You must be signed in to change notification settings - Fork 29
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
ERR_UNSUPPORTED_DIR_IMPORT #87
Comments
The polyfill does not yet fully support native ESM in Node. I'm currently working on this for v4.0 in #83, which should land soon(ish). For now, you can work around this by importing the import { ReadableStream as PonyReadableStream } from 'web-streams-polyfill/dist/ponyfill.mjs' |
This is implemented in #83. Give it a spin with the latest beta release: v4.0.0-beta.3. 😉 Note that the polyfill's exports have changed in 4.0, see MIGRATING for more information. Your example would now look like this: // test.mjs
import { ReadableStream as PonyReadableStream } from 'web-streams-polyfill'
console.log(PonyReadableStream) |
Reproduce
Expect
No error
Actual
Else
The text was updated successfully, but these errors were encountered: