Use Rolldown in build-tools#1359
Conversation
build-tools
…packages themselves.
| /** | ||
| * Restores the `@preserve` marker removed by Rolldown when it normalizes pure annotations. | ||
| * | ||
| * This plugin can be removed once https://github.com/rolldown/rolldown/issues/9408 is fixed. |
There was a problem hiding this comment.
The mentioned issue already has a PR that fixes it, so we may be able to remove this plugin before this PR gets merged.
| } ); | ||
| } | ||
|
|
||
| function getDirectParentClasses( |
There was a problem hiding this comment.
The current implementation works fine when the mixins are used like this:
class FileUploader extends /* #__PURE__ */ EmitterMixin() { /* ... */ }However, it doesn't work when we use the following approach required by TypeScript's isolated declarations:
const FileUploaderBase: EmitterMixinConstructor = /* #__PURE__ */ EmitterMixin();
class FileUploader extends FileUploaderBase { /* ... */ }
This change fixes it.
…n-for-build-tools
…isolated-declarations' into ci/4316-use-rolldown-for-build-tools
…isolated-declarations' into ci/4316-use-rolldown-for-build-tools
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8fbeea9. Configure here.
|
|
||
| async generateBundle() { | ||
| const sourceFilePaths = getTypeScriptSourceFiles( sourceDirectoryPath ); | ||
| const sourceFilePaths = getTypeScriptSourceFiles( pluginOptions.sourceDirectory ); |
There was a problem hiding this comment.
Declarations ignore tsconfig scope
Medium Severity
With declarations enabled, .d.ts files are generated by globbing every *.{ts,tsx,mts,cts} under path.dirname(input), not by honoring the provided tsconfig include/exclude. Files excluded from the project (or only reachable via a broader include) can still be processed or skipped incorrectly, unlike the removed TypeScript plugin.
Reviewed by Cursor Bugbot for commit 8fbeea9. Configure here.
There was a problem hiding this comment.
I think this is acceptable for this PR. The declaration plugin intentionally works from the build input directory and mirrors source files into declaration assets. The build still passes the tsconfig to Rolldown, and declarations are only enabled when the tsconfig exists.
Fully matching TypeScript project file discovery would require implementing files/include/exclude, extends, default excludes, and TypeScript glob semantics. A partial implementation would likely be more fragile than the current explicit source-directory behavior.
If this becomes necessary, we would handle it as a separate improvement.


🚀 Summary
Migrate the repository tooling to Rolldown and isolated declarations.
📌 Related issues
💡 Additional information
N/A