Skip to content

ESM entrypoint isn't functional #260

@acidoxee

Description

@acidoxee

The files in dist/esm are not valid ESM because:

  • The folder is missing a package.json with { "type": "module" } in it, OR files use a .js extension instead of .mjs (since the closest package.json states the package is using CJS)
  • Relative imports in those files don't have an extension

This causes esbuild (for my case) and maybe other bundlers to discard this entrypoint and fallback to the CJS one instead (TypeScript resolution also points towards the CJS entrypoint, even when consumed from ESM code).

Do you think you might be able to fix the entrypoint to make ESM code able to consume ESM from your package as well? 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions