Skip to content

add exports type map to package.json#202

Merged
noahgrant merged 2 commits into
mainfrom
exports_map
Apr 23, 2026
Merged

add exports type map to package.json#202
noahgrant merged 2 commits into
mainfrom
exports_map

Conversation

@noahgrant
Copy link
Copy Markdown
Owner

Expands the exports field in package.json from a bare string to a subpath map:

  "exports": {    
    ".": {                                                         
      "types": "./resourcerer.d.ts",                               
      "import": "./build/index.js"
    }
  }                                                                

This allows TypeScript-aware bundlers and Node's package resolution to discover types automatically via the exports map,
rather than relying solely on the top-level "types" field. Better compatibility with tools that honor exports conditions (e.g.
TypeScript's moduleResolution: bundler or node16).

noahgrant and others added 2 commits April 23, 2026 08:56
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@noahgrant noahgrant merged commit 191c1e6 into main Apr 23, 2026
1 check passed
@noahgrant noahgrant deleted the exports_map branch April 23, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant