Skip to content

feat: add hidden resolve_tsconfig function for Vite#8257

Merged
graphite-app[bot] merged 1 commit intomainfrom
02-09-feat_add_hidden_resolve_tsconfig_function_for_vite
Feb 10, 2026
Merged

feat: add hidden resolve_tsconfig function for Vite#8257
graphite-app[bot] merged 1 commit intomainfrom
02-09-feat_add_hidden_resolve_tsconfig_function_for_vite

Conversation

@sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Feb 9, 2026

This PR adds a hidden resolve_tsconfig function for vitejs/vite#21577. This will improve the consistency.

This function is only used in the deprecated transformWithEsbuild function, which will be removed in the next major version of Vite. We can remove this function once that is removed.

Copy link
Member Author


How to use the Graphite Merge Queue

Add the label graphite: merge-when-ready to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@netlify
Copy link

netlify bot commented Feb 9, 2026

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 4994992
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/698a8ce85ef1370007e009c2

@sapphi-red sapphi-red marked this pull request as ready for review February 9, 2026 13:29
Copilot AI review requested due to automatic review settings February 9, 2026 13:29
Copy link
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

Adds a hidden resolveTsconfig binding intended for Vite’s deprecated transformWithEsbuild, to make tsconfig resolution behavior more consistent with Rolldown’s existing tsconfig handling.

Changes:

  • Expose a new N-API function resolveTsconfig via the experimental JS entrypoint and generated WASI/native binding shims.
  • Add TypeScript declaration types for the returned tsconfig shape (BindingTsconfigResult / compiler options).
  • Add Vitest coverage + fixtures for basic resolution, caching, and extends behavior.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/rolldown/tests/utils/resolve-tsconfig.test.ts Adds tests for resolveTsconfig, cache usage, and extended tsconfig behavior.
packages/rolldown/tests/utils/fixtures/extends/tsconfig.json Adds an extends tsconfig fixture for inheritance coverage.
packages/rolldown/tests/utils/fixtures/extends/test.ts Adds a TS source fixture used for tsconfig resolution.
packages/rolldown/src/rolldown-binding.wasi.cjs Exposes resolveTsconfig in the WASI CJS binding shim.
packages/rolldown/src/rolldown-binding.wasi-browser.js Exposes resolveTsconfig in the WASI browser binding shim.
packages/rolldown/src/experimental-index.ts Re-exports resolveTsconfig from the experimental entrypoint.
packages/rolldown/src/binding.d.cts Adds TS type declarations for resolveTsconfig and its result types.
packages/rolldown/src/binding.cjs Exposes resolveTsconfig from the native binding.
crates/rolldown_binding/src/transform.rs Implements the new N-API resolve_tsconfig and binding structs for tsconfig output.
crates/rolldown_binding/Cargo.toml Adds indexmap dependency to support paths mapping output.
Cargo.toml Enables napi feature needed for IndexMap object interop.
Cargo.lock Updates lockfile for the new dependency.

Copy link
Member Author

sapphi-red commented Feb 9, 2026

Merge activity

  • Feb 9, 1:39 PM UTC: The merge label 'graphite: merge-when-ready' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Feb 10, 1:41 AM UTC: sapphi-red added this pull request to the Graphite merge queue.
  • Feb 10, 1:53 AM UTC: Merged by the Graphite merge queue.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

Benchmarks Rust

  • target: main(9a5231f)
  • pr: 02-09-feat_add_hidden_resolve_tsconfig_function_for_vite(4994992)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.00     65.2±1.60ms        ? ?/sec    1.02     66.7±1.72ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.00     70.3±1.10ms        ? ?/sec    1.03     72.8±1.50ms        ? ?/sec
bundle/bundle@rome_ts                                        1.00     96.7±1.54ms        ? ?/sec    1.01     97.9±1.81ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    107.9±2.21ms        ? ?/sec    1.02    110.0±1.64ms        ? ?/sec
bundle/bundle@threejs                                        1.01     34.6±2.06ms        ? ?/sec    1.00     34.3±0.46ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.00     38.8±0.76ms        ? ?/sec    1.01     39.3±0.59ms        ? ?/sec
bundle/bundle@threejs10x                                     1.00    351.1±2.59ms        ? ?/sec    1.01    355.4±5.63ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    407.8±4.04ms        ? ?/sec    1.00    409.1±4.84ms        ? ?/sec
scan/scan@rome_ts                                            1.01     78.7±1.47ms        ? ?/sec    1.00     77.9±1.37ms        ? ?/sec
scan/scan@threejs                                            1.00     27.1±0.35ms        ? ?/sec    1.00     27.0±0.37ms        ? ?/sec
scan/scan@threejs10x                                         1.00    276.8±4.34ms        ? ?/sec    1.00    277.1±4.27ms        ? ?/sec

This PR adds a hidden `resolve_tsconfig` function for vitejs/vite#21577. This will improve the consistency.

This function is only used in the deprecated `transformWithEsbuild` function, which will be removed in the next major version of Vite. We can remove this function once that is removed.
@graphite-app graphite-app bot force-pushed the 02-09-feat_add_hidden_resolve_tsconfig_function_for_vite branch from fa0c67a to 4994992 Compare February 10, 2026 01:41
@graphite-app graphite-app bot merged commit 4994992 into main Feb 10, 2026
36 checks passed
@graphite-app graphite-app bot deleted the 02-09-feat_add_hidden_resolve_tsconfig_function_for_vite branch February 10, 2026 01:53
This was referenced Feb 11, 2026
shulaoda added a commit that referenced this pull request Feb 11, 2026
## [1.0.0-rc.4] - 2026-02-11

💡 Granular `comments` Option
- New `output.comments` option provides fine-grained control over comment preservation
- The `output.legalComments` option is now deprecated and use `comments.legal` instead

### 🚀 Features

- rename error name to `RolldownError` from `RollupError` (#8262) by @sapphi-red
- add hidden `resolve_tsconfig` function for Vite (#8257) by @sapphi-red
- rust: introduce `rolldown_watcher` (#8161) by @hyf0
- unify `comments` and `legalComments` into a single granular `comments` option (#8229) by @IWANABETHATGUY
- add builtin plugin for visualizing chunk graph (#8162) by @IWANABETHATGUY
- show import declaration location in AssignToImport errors (#8222) by @Copilot
- show import declaration span in CannotCallNamespace error (#8223) by @Copilot
- emit error when plugin accidentally removes runtime module symbols (#8203) by @IWANABETHATGUY
- support tsconfig loading & inputMap for `transform` (#8180) by @sapphi-red
- rolldown_plugin_vite_reporter: update warning message to link to Rolldown docs (#8205) by @sapphi-red

### 🐛 Bug Fixes

- avoid panic on untranspiled JSX syntax by reporting a diagnostic error (#8226) by @IWANABETHATGUY
- rolldown_plugin_vite_import_glob: relax absolute path check and improve invalid glob warning (#8219) by @shulaoda
- merge chunks after detect circular reference (#8154) by @IWANABETHATGUY
- rust: detect runtime module side effects based on its content (#8209) by @hyf0

### 🚜 Refactor

- rename `other` to `jsdoc` in comments options (#8256) by @IWANABETHATGUY
- rename chunk-visualize plugin with bundle-analyzer plugin (#8255) by @IWANABETHATGUY
- remove EXPORT_UNDEFINED_VARIABLE error (#8228) by @Copilot
- consolidate missing runtime symbol errors into a single diagnostic (#8220) by @IWANABETHATGUY
- stabilize `parse` and `parseSync` (#8215) by @sapphi-red
- return errors instead of panicking on builtin plugin conversion failure (#8217) by @shulaoda
- expose `parse` / `minify` / `transform` from `rolldown/utils` (#8214) by @sapphi-red
- prepare defer chunk merging (#8153) by @IWANABETHATGUY

### 📚 Documentation

- remove `<script>` escape behavior difference note from `platform` option (#8253) by @sapphi-red
- TypeScript & JSX support by plugins (#8183) by @sapphi-red

### 🧪 Testing

- ensure runtime module is preserved even if it's not used but has side effects (#8213) by @hyf0

### ⚙️ Miscellaneous Tasks

- deps: update oxc to v0.113.0 (#8267) by @renovate[bot]
- deps: update dependency oxlint-tsgolint to v0.12.0 (#8272) by @renovate[bot]
- deps: update oxc apps (#8269) by @renovate[bot]
- deps: update test262 submodule for tests (#8261) by @sapphi-red
- deps: update crate-ci/typos action to v1.43.4 (#8260) by @renovate[bot]
- deps: update dependency esbuild to v0.27.3 (#8250) by @renovate[bot]
- deps: update rust crates (#8244) by @renovate[bot]
- deps: update dependency semver to v7.7.4 (#8247) by @renovate[bot]
- deps: update github-actions (#8243) by @renovate[bot]
- deps: update npm packages (#8245) by @renovate[bot]
- deps: update oxc resolver to v11.17.1 (#8240) by @renovate[bot]
- deps: update rust crate oxc_sourcemap to v6.0.2 (#8241) by @renovate[bot]
- rust: handle ignored `RUSTSEC-2025-0141` cargo check error (#8235) by @hyf0
- deps: update dependency oxlint-tsgolint to v0.11.5 (#8233) by @renovate[bot]
- deps: update dependency rolldown-plugin-dts to ^0.22.0 (#8232) by @renovate[bot]
- deps: update crate-ci/typos action to v1.43.3 (#8225) by @renovate[bot]
- deps: update dependency rolldown-plugin-dts to v0.21.9 (#8224) by @renovate[bot]
- deps: update crate-ci/typos action to v1.43.2 (#8212) by @renovate[bot]
- remove rolldown_plugin_vite_wasm_helper (#8207) by @shulaoda
- build docs for production (#8206) by @sapphi-red

Co-authored-by: shulaoda <165626830+shulaoda@users.noreply.github.com>
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.

3 participants