Skip to content

package.json "module" points at ./index.mjs, which no longer exists #77

Closed

Description

@Shinrai

Problem

#56 moved the build to dist/ and deleted the root index.mjs, but package.json still has "module": "./index.mjs". Node resolves through exports, so imports still work, but tools that read the legacy module field (bundlers, some analyzers) point at a file the package doesn't ship.

Fix

  • "module": "./dist/index.mjs", matching exports["."].import.
  • The tsup build integration test asserts that every entry point package.json names (main, module, types, the exports import/require/types, bin) exists in the build output (or the repo for types/), so a stale field can't ship unnoticed again.

Found while preparing the v1.4.0 release notes (#76).

Activity

  1. added
    type: bug
    priority: medium
    type: config
    status: in progress
    status: implemented
    and removed
    status: in progress
    on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumstatus: implementedtype: bugtype: config

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions