Repository navigation
refactor: remove prebundle setup - #1771
Merged
Merged
Conversation
Timeless0911
approved these changes
Jul 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the prebundle workflow and the generated compiled/ directories from Rslib packages, aiming to reduce release/maintenance overhead and avoid shipping prebundled dependencies. It replaces the previous prebundled/aliased approach with a small inlined color helper in @rslib/core, and a lazy tsconfig-paths load path for rsbuild-plugin-dts.
Changes:
- Remove
prebundlescripts/config and stop publishingcompiled/directories from package artifacts. - Inline a minimal
colorhelper in@rslib/coreinstead of re-exporting it fromrslog. - Make
tsconfig-pathsload lazily via dynamic import, and adjust bundling config (ESM require shim +json5alias) accordingly.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Drops prebundle (and related transitive deps) from the lockfile. |
| packages/plugin-dts/tsconfig.json | Removes the paths mapping that pointed to ./compiled/tsconfig-paths. |
| packages/plugin-dts/src/utils.ts | Switches tsconfig-paths usage to a lazy dynamic import when redirects are enabled. |
| packages/plugin-dts/rslib.config.ts | Adds ESM require shim and json5$ alias to support bundling/interop after removing prebundle. |
| packages/plugin-dts/prebundle.config.ts | Removes prebundle configuration (file deleted). |
| packages/plugin-dts/package.json | Stops publishing compiled/ and removes the prebundle script. |
| packages/core/src/utils/color.ts | Replaces rslog color re-export with an inlined node:util-based styler. |
| packages/core/rslib.config.ts | Removes the dts.alias that referenced prebundled rslog types. |
| packages/core/prebundle.config.ts | Removes prebundle configuration (file deleted). |
| packages/core/package.json | Stops publishing compiled/ and removes the prebundle script. |
| package.json | Removes root prebundle script and stops running it from prepare. |
| CONTRIBUTING.md | Updates contributor docs to reflect prepare no longer runs prebundle. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
| let matchPath: MatchPath | undefined; | ||
|
|
||
| if (redirect.path || redirect.extension) { | ||
| const { createMatchPath, loadConfig } = await import('tsconfig-paths'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR removes the prebundle step and generated compiled directories from Rslib packages, reducing release maintenance and avoiding shipping prebundled dependencies.
tsconfig-pathslazily through a dynamic import, with the ESM require shim and a CommonJSjson5alias.compiledfrom published files.Checklist