Skip to content

build --save missing 'import' field in '.' export entry #7

@brainkim

Description

@brainkim

Bug

Running libuild build --save generates an exports map in the root package.json where the "." entry is missing the "import" field, while other entries have it:

"exports": {
    ".": {
      "types": "./dist/src/crank-editable.d.ts"
    },
    "./crank-editable": {
      "types": "./dist/src/crank-editable.d.ts",
      "import": "./dist/src/crank-editable.js"
    }
}

The "." entry should also have "import": "./dist/src/crank-editable.js".

Reproduction

cd packages/crankeditable
npx libuild build --save
cat package.json  # "." export missing "import"

This causes bundlers like esbuild to fail resolving the package when symlinked locally.

Expected

".": {
  "types": "./dist/src/crank-editable.d.ts",
  "import": "./dist/src/crank-editable.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