Skip to content

[codex] Fix root types entry#917

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

[codex] Fix root types entry#917
luuhongyii wants to merge 1 commit into
unplugin:mainfrom
luuhongyii:codex/fix-root-types-entry

Conversation

@luuhongyii

Copy link
Copy Markdown

Summary

This fixes the root TypeScript declaration entry in package.json.

The published package/build output emits dist/index.d.mts, but the root types field currently points to ./dist/index.d.ts, which is not present in the package tarball. TypeScript consumers that read the root types field can therefore resolve a missing declaration file.

Change

  • Update types from ./dist/index.d.ts to ./dist/index.d.mts.

Validation

  • npm pack unplugin-vue-components@32.1.0 --dry-run --json confirmed the published tarball contains dist/index.d.mts and not dist/index.d.ts.
  • corepack pnpm install --frozen-lockfile --ignore-scripts
  • corepack pnpm build
  • node -e "const fs=require('fs'); const p=require('./package.json'); console.log(JSON.stringify({types:p.types, typesExists:fs.existsSync(p.types)}, null, 2))"
  • npm pack --dry-run --json
  • corepack pnpm test --run (9 files / 36 tests passed)
  • git diff --check

@luuhongyii luuhongyii requested a review from antfu as a code owner June 13, 2026 06:31
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@pkg-pr-new

pkg-pr-new Bot commented Jun 14, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/unplugin-vue-components@917

commit: 17d977f

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.

2 participants