Skip to content

Provide ESM version of the package #488

Open
@minht11

Description

@minht11

Right now Iterable Package publishes only amd version of the package, which is hard for bundlers to effectively to treeshake. At this point in time all green browsers support native ES modules for many years, Node included, so NPM version does not get any interoperability from it with added downside of extra bundle size.

ES5 downleveling seems not usefull as well, if consumers of iterable need downleveling they will do it themselves, but they likely do not. If browser supports ESM they support conts keyword.

The best way forward would be to expose multiple versions of the bundle using conditional package.json exports, providing both ESM, AMD and if needed CJS versions. Bundlers and users could pick and choose best format for them.

Semi related to #442

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