Skip to content

Comments

feat(rolldown_plugin_vite_resolve): align subpath import resolution#5093

Merged
shulaoda merged 1 commit intomainfrom
06-28-feat_rolldown_vite_resolve_align_subpath_import_resolution
Jun 29, 2025
Merged

feat(rolldown_plugin_vite_resolve): align subpath import resolution#5093
shulaoda merged 1 commit intomainfrom
06-28-feat_rolldown_vite_resolve_align_subpath_import_resolution

Conversation

@shulaoda
Copy link
Member

@shulaoda shulaoda commented Jun 28, 2025

Although rolldown-vite aligns partially with the js behavior through the importGlobSubpathImportsResolvePlugin, its logic is not fully consistent. Additionally, the custom can only be passed between JS plugins or between native plugins — communication between JS and native plugins is not supported.

Therefore, this subpath import resolution logic needs to be moved into the native plugin to ensure correctness and compatibility.

Copy link
Member Author

shulaoda commented Jun 28, 2025

@netlify
Copy link

netlify bot commented Jun 28, 2025

Deploy Preview for rolldown-rs failed.

Name Link
🔨 Latest commit 24940fe
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/685f3870b9c8a30008c52812

@shulaoda shulaoda requested a review from sapphi-red June 28, 2025 00:40
@shulaoda shulaoda marked this pull request as ready for review June 28, 2025 00:40
@shulaoda shulaoda changed the title feat(rolldown_vite_resolve): align subpath import resolution feat(rolldown_plugin_vite_resolve): align subpath import resolution Jun 28, 2025
@github-actions
Copy link
Contributor

Benchmarks Rust

  • target: main(24cd70d)
  • pr: 06-28-feat_rolldown_vite_resolve_align_subpath_import_resolution(24940fe)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.01     74.0±1.68ms        ? ?/sec    1.00     73.5±1.34ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.01     84.8±1.23ms        ? ?/sec    1.00     84.4±1.08ms        ? ?/sec
bundle/bundle@rome_ts                                        1.00    112.3±3.82ms        ? ?/sec    1.00    112.4±1.47ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.01    132.5±4.65ms        ? ?/sec    1.00    131.5±1.40ms        ? ?/sec
bundle/bundle@threejs                                        1.00     40.2±0.67ms        ? ?/sec    1.00     40.1±0.77ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.00     50.4±0.92ms        ? ?/sec    1.00     50.2±0.52ms        ? ?/sec
bundle/bundle@threejs10x                                     1.00    431.7±4.71ms        ? ?/sec    1.00    433.0±4.95ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    502.7±2.40ms        ? ?/sec    1.00    503.2±2.11ms        ? ?/sec
scan/scan@rome_ts                                            1.01     87.0±1.31ms        ? ?/sec    1.00     86.4±1.14ms        ? ?/sec
scan/scan@threejs                                            1.00     30.1±0.29ms        ? ?/sec    1.00     30.1±0.48ms        ? ?/sec
scan/scan@threejs10x                                         1.01    319.3±5.33ms        ? ?/sec    1.00    317.1±4.64ms        ? ?/sec

@sapphi-red
Copy link
Member

Does this work with enableNativePlugins: 'resolver'? Also does this work in dev?

@shulaoda
Copy link
Member Author

shulaoda commented Jun 28, 2025

Does this work with enableNativePlugins: 'resolver'? Also does this work in dev?

Yes, I'm currently working on resolving it. At the moment, it's not yet supported.

@shulaoda shulaoda added this pull request to the merge queue Jun 29, 2025
Merged via the queue into main with commit d3afb1e Jun 29, 2025
25 of 29 checks passed
@shulaoda shulaoda deleted the 06-28-feat_rolldown_vite_resolve_align_subpath_import_resolution branch June 29, 2025 16:27
github-merge-queue bot pushed a commit that referenced this pull request Jun 29, 2025
…5097)

Does this work with `enableNativePlugins: 'resolver'`? Also does this
work in dev?

_Originally posted by @sapphi-red in
#5093 (comment)
Boshen pushed a commit that referenced this pull request Jun 30, 2025
## [1.0.0-beta.22] - 2025-06-30

### 🚀 Features

- plugin: use `Log` instead of `BuildDiagnostic` for `PluginContext#log` (#5099) by @shulaoda
- plugin: support info/warn/debug in native plugin context (#5098) by @shulaoda
- plugin: support vite plugin custom in `PluginContext#resolve` (#5097) by @shulaoda
- rolldown_plugin_import_glob: align edge cases with `rolldown-vite` (#5094) by @shulaoda
- rolldown_plugin_vite_resolve: align subpath import resolution (#5093) by @shulaoda
- add commonjs tree shake option (#5096) by @IWANABETHATGUY
- rolldown_plugin_web_worker_post: align with `rolldown-vite` (#5092) by @shulaoda
- manual-chunks: support `getModuleInfo` (#5087) by @hyf0
- advanced-chunks: support `getModuleInfo` in `groups.{group}.name` (#5086) by @hyf0

### 🚜 Refactor

- rolldown_loader_utils: inline unnecessary `binary_to_esm` (#5100) by @shulaoda

### ⚡ Performance

- hmr: remove `console.debug` in `runtime.registerModule` (#5091) by @sapphi-red
- hmr: remove no-op `runtime.__toCommonJS` call (#5089) by @sapphi-red

### ⚙️ Miscellaneous Tasks

- deps: lock file maintenance rust crates (#5105) by @renovate[bot]
- deps: lock file maintenance npm packages (#5104) by @renovate[bot]
- deps: update rust crate schemars to v1 (#5103) by @renovate[bot]
- deps: update dependency vite to v7 (#5102) by @renovate[bot]
- deps: update github-actions (#5101) by @renovate[bot]
- deps: update dependency rolldown-plugin-dts to v0.13.12 (#5088) by @renovate[bot]
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