Skip to content

Rollup bundle error trying to import default from web-streams-polyfill #7

Description

@olizilla

Using rollup to bundle a module that depends on @web-std/fetch I'm hitting an error:

@web-std/blob (imported by src/platform.js, node_modules/@web-std/fetch/src/index.js, node_modules/@web-std/fetch/src/body.js)
[!] Error: 'default' is not exported by node_modules/web-streams-polyfill/dist/polyfill.mjs, imported by node_modules/@web-std/fetch/src/body.js
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
node_modules/@web-std/fetch/src/body.js (12:7)
10: 
11: import {Blob} from '@web-std/blob';
12: import WebStreams from 'web-streams-polyfill';

Looking at

io/fetch/src/index.js

Lines 21 to 26 in 68e89a8

import WebStreams from 'web-streams-polyfill';
import {pipeline as pump, PassThrough} from 'stream';
import * as Stream from 'stream';
import {Blob} from '@web-std/blob';
const {ReadableStream} = WebStreams;

and https://github.com/MattiasBuelens/web-streams-polyfill/blob/956de3d56a1c4565563f85f9180d4bac39571b74/src/polyfill.ts#L19-L38

it looks like there is no default export from web-streams-polyfill

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions