Skip to content

fix(build): generate correct DTS for all non-entry files#24179

Merged
btea merged 1 commit into
devfrom
fix/dts-non-entry
May 8, 2026
Merged

fix(build): generate correct DTS for all non-entry files#24179
btea merged 1 commit into
devfrom
fix/dts-non-entry

Conversation

@rzzf
Copy link
Copy Markdown
Member

@rzzf rzzf commented Apr 30, 2026

resolves:

Based on https://github.com/sxzz/rolldown-plugin-dts#entry

Summary by CodeRabbit

  • Chores
    • Updated build toolchain dependencies to newer pinned versions for more predictable, reproducible builds.
    • Refined type-definition generation: tightened which source files are included and updated plugin configuration to improve consistency and clearer exclusions.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 30, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Pin build tool dependencies and tighten DTS input selection: internal/build/package.json updates rolldown packages; internal/build/src/tasks/types-definitions.ts narrows glob inputs and supplies an explicit entry list plus cwd: pkgRoot to the rolldown-plugin-dts config.

Changes

Cohort / File(s) Summary
Dependency Pinning
internal/build/package.json
Bumped/changed rolldown deps from rc.6 / 0.22.2 → rc.12 / 0.23.2, affecting resolved build-tool versions.
Type Definitions Generation
internal/build/src/tasks/types-definitions.ts
Replaced previous glob-derived input with narrowed **/index.ts pattern; added cwd: pkgRoot and an explicit entry glob (**/*.{ts,tsx,vue}) to rolldown-plugin-dts, excluding style files, tests/mocks, buildfiles, and certain subtrees—changing which sources are considered for DTS output.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

CommitMessage::Unqualified

Poem

🐰 I hopped through globs both narrow and wide,

Pinned the rollers so versions won't slide,
I trimmed out tests and styles from the view,
Now type maps bundle tidy and true,
A little rabbit's cheer for the build pipeline.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The PR description is minimal but includes essential information: related issue/PR links and a reference to the rolldown-plugin-dts documentation explaining the changes. Add more detailed explanation of what the changes fix, why the glob pattern changes are necessary, and what the expected outcome is for users.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing DTS generation for non-entry files by updating build toolchain and glob patterns.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/dts-non-entry

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 30, 2026

Open in StackBlitz

pnpm add https://pkg.pr.new/element-plus@24179
npm i https://pkg.pr.new/element-plus@24179
yarn add https://pkg.pr.new/[email protected]

commit: c538eaa

@rzzf
Copy link
Copy Markdown
Member Author

rzzf commented Apr 30, 2026

@zhixiaotong 你可以试一下这个更改对你的项目有效吗?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

Size Change: +50.6 kB (+3.4%)

Total Size: 1.54 MB

📦 View Changed
Filename Size Change
dist/element-plus/dist/index.full.js 465 kB +25.9 kB (+5.91%) 🔍
dist/element-plus/dist/index.full.min.js 289 kB -335 B (-0.12%)
dist/element-plus/dist/index.full.min.mjs 282 kB -319 B (-0.11%)
dist/element-plus/dist/index.full.mjs 455 kB +25.4 kB (+5.91%) 🔍
ℹ️ View Unchanged
Filename Size
dist/element-plus/dist/index.css 47.3 kB

compressed-size-action

coderabbitai[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 86.28% 18677 / 21646
🔵 Statements 85.11% 19555 / 22974
🔵 Functions 84.64% 4957 / 5856
🔵 Branches 75.73% 10890 / 14379
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/components/carousel/src/use-carousel.ts 70.86% 56.52% 72.91% 70.8% 111-112, 118-122, 127-128, 133, 152-168, 174-200, 230, 265, 271, 277, 284, 302
Generated in workflow #2715 for commit c538eaa by the Vitest Coverage Report Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

🧪 Playground Preview: https://element-plus.run/?pr=24179
Please comment the example via this playground if needed.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@coderabbitai

This comment was marked as spam.

@rzzf rzzf marked this pull request as draft April 30, 2026 04:45
@rzzf rzzf force-pushed the fix/dts-non-entry branch from 374a9fd to be516d6 Compare April 30, 2026 05:49
@rzzf rzzf marked this pull request as ready for review April 30, 2026 05:51
@rzzf rzzf requested review from Dsaquel and btea April 30, 2026 05:54
@rzzf
Copy link
Copy Markdown
Member Author

rzzf commented Apr 30, 2026

The change in the full bundle size is caused by the upgrade of Rolldown

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@zhixiaotong
Copy link
Copy Markdown
Contributor

我看到了,我稍后试一下~

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@zhixiaotong
Copy link
Copy Markdown
Contributor

image 似乎不行,我用pnpm下载,可能是本地已经有2.13.7的版本,导致无法查看变化,于是用npm在另一个地方下载了,这个没看到里面有dts文件

@rzzf
Copy link
Copy Markdown
Member Author

rzzf commented Apr 30, 2026

@zhixiaotong 有删除node_modules之后重新安装吗?

@zhixiaotong
Copy link
Copy Markdown
Contributor

npm不会受pnpm缓存影响,但我打开npm下载的构建物,没有dts呢

@rzzf rzzf marked this pull request as draft April 30, 2026 12:43
@rzzf rzzf marked this pull request as ready for review May 2, 2026 10:57
@rzzf
Copy link
Copy Markdown
Member Author

rzzf commented May 8, 2026

Now, rolldown 1.0
was released. After upgrading the dependencies, builds with full input entries are no longer excessively slow.

@btea

This comment was marked as resolved.

@rzzf
Copy link
Copy Markdown
Member Author

rzzf commented May 8, 2026

Based on the CI results, the build time after the upgrade does not differ much from the previous run. I'm not sure what exactly caused this, but on my machine, the build was almost impossible to complete before the upgrade. I once waited for more than 20 minutes and it still didn't finish, whereas now the result is similar to CI and completes in around 10-20 seconds.

image image
  • local build
image

btea