Skip to content

fix(core): bump rslib and fix type related issues#13376

Merged
chenjiahan merged 3 commits intomainfrom
fix/prebundle-dts-entrypoints
Mar 25, 2026
Merged

fix(core): bump rslib and fix type related issues#13376
chenjiahan merged 3 commits intomainfrom
fix/prebundle-dts-entrypoints

Conversation

@Timeless0911
Copy link
Copy Markdown
Contributor

@Timeless0911 Timeless0911 commented Mar 16, 2026

Summary

Improve @rspack/core declaration compatibility under moduleResolution: "nodenext".

  • normalize prebundled declaration entrypoints for webpack-sources and watchpack
  • keep Source and WatchOptions resolvable from bundled dependency declarations
  • upgrade @rslib/core to 0.20.1 and adapt the emitted index.js/index.d.ts rewrites so Rspack.* namespace types remain accessible

Related links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@Timeless0911 Timeless0911 requested a review from hardfist as a code owner March 16, 2026 11:59
Copilot AI review requested due to automatic review settings March 16, 2026 11:59
@github-actions github-actions Bot added team The issue/pr is created by the member of Rspack. release: bug fix release: bug related release(mr only) labels Mar 16, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the @rspack/core prebundle configuration to normalize the generated declaration entrypoints for webpack-sources and watchpack, ensuring the emitted .d.ts filenames and package.json types field stay consistent.

Changes:

  • Add helpers to rename copied .d.ts files and rewrite the bundled dependency package.json types field.
  • Normalize webpack-sources declarations by renaming types.d.ts to index.d.ts and updating types.
  • Enhance watchpack declarations by injecting a missing WatchOptions type export, preserving the graceful-fs @ts-ignore patch, and updating types.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/rspack/prebundle.config.js Outdated
Comment thread packages/rspack/prebundle.config.js Outdated
@Timeless0911 Timeless0911 force-pushed the fix/prebundle-dts-entrypoints branch from eb3b1b1 to fe113dd Compare March 16, 2026 12:11
@Timeless0911 Timeless0911 marked this pull request as draft March 16, 2026 12:14
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 16, 2026

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Change
react-1k 826.2 KB 0
react-10k 5.7 MB 0
react-5k 2.7 MB 0
rome 984.2 KB 0
ui-components 2.3 MB 0

Generated by Rsdoctor GitHub Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 16, 2026

📦 Binary Size-limit

Comparing 351cf67 to chore(ci): remove stale miri config (#13465) by neverland

🙈 Size remains the same at 48.97MB

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Mar 16, 2026

Merging this PR will not alter performance

✅ 23 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing fix/prebundle-dts-entrypoints (351cf67) with main (1c683d6)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Timeless0911 Timeless0911 changed the title fix: normalize prebundle declaration entrypoints fix: improve declaration compatibility under NodeNext Mar 25, 2026
@Timeless0911 Timeless0911 force-pushed the fix/prebundle-dts-entrypoints branch from fe113dd to 0ce4523 Compare March 25, 2026 10:04
@Timeless0911 Timeless0911 changed the title fix: improve declaration compatibility under NodeNext fix: bump rslib and fix type related issues Mar 25, 2026
@Timeless0911 Timeless0911 marked this pull request as ready for review March 25, 2026 10:05
Comment thread packages/rspack/prebundle.config.js
@Timeless0911 Timeless0911 changed the title fix: bump rslib and fix type related issues fix(core): bump rslib and fix type related issues Mar 25, 2026
@chenjiahan
Copy link
Copy Markdown
Member

LGTM

@chenjiahan chenjiahan merged commit 563a200 into main Mar 25, 2026
45 checks passed
@chenjiahan chenjiahan deleted the fix/prebundle-dts-entrypoints branch March 25, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Source type resolves to any under moduleResolution: "nodenext" due to unresolvable ../compiled/webpack-sources import

3 participants