Skip to content

Only types build option (or auto-detect) #139

@enisdenjo

Description

@enisdenjo

When building packages that contain only types (like @envelop/types), the resolution fields in package.json should contain:

{
  "main": "",
  "types": "index.d.ts"
}

without resolutions for module and other exports.

This aligns with how DefinitelyTyped packs types.

Additionally, this improvement would eradicate false positives for linting tools that check re-exports (like here).

Metadata

Metadata

Assignees

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