Skip to content

Fix package types entry#339

Open
luuhongyii wants to merge 1 commit into
Talljack:mainfrom
luuhongyii:codex/fix-types-entry
Open

Fix package types entry#339
luuhongyii wants to merge 1 commit into
Talljack:mainfrom
luuhongyii:codex/fix-types-entry

Conversation

@luuhongyii

Copy link
Copy Markdown

Summary

  • point the package types entry to the declaration file generated and published by the build: dist/index.d.ts
  • leave runtime exports and build output unchanged

Problem

[email protected] publishes dist/index.d.ts, but its package manifest currently has:

"types": "index.d.ts"

The package tarball does not include a root index.d.ts, so tools that read the top-level types field can resolve to a missing file.

Verification

  • npm pack [email protected] --dry-run --ignore-scripts --json shows dist/index.d.ts is present and root index.d.ts is absent
  • pnpm run build succeeds and generates dist/index.d.ts
  • pnpm exec vitest run passes: 10 tests
  • local npm pack --dry-run --ignore-scripts --json after build confirms the configured types file exists in the packed file list
  • git diff --check

Note

pnpm run typecheck currently fails on existing dependency/playground typing issues, including missing declarations from @rspack/core, webpack-sources, rolldown, and playground JSX settings. I left those unrelated issues out of this focused manifest fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant