Skip to content

Distribute esm version #174

@flying-sheep

Description

@flying-sheep

Looks like you only distribute a commonjs index.js, causing bundlers to create compatibility code.

Many projects only ship ESM versions today, so you should at least ship both versions.

E.g. your dependency isexe has this in its package.json:

{
  "exports": {
    "./package.json": "./package.json",
    ".": {
      "import": {
        "types": "./dist/esm/index.d.ts",
        "default": "./dist/esm/index.min.js"
      },
      "require": {
        "types": "./dist/commonjs/index.d.ts",
        "default": "./dist/commonjs/index.min.js"
      }
    }
  },
}

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