Skip to content

Missing exports field causing packge to be incompatible with ESM #93

Open
@jmrossy

Description

@jmrossy

The package.json should have an exports field that matches the parts of the files list that may be imported into JS code. JS tooling (typescript, bundlers, vscode) tends to forgive the missing field when the consuming package isn't using ESM modules but imports will fail when they are using ESM.

Also the files field looks incorrect to be but I may be missing something. It's pointing to files and folders at the root that don't exist.

A useful resource to learn more about this: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#how-can-i-make-my-typescript-project-output-esm

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