Skip to content

Comments

wip: try native react-refresh-wrapper plugin#5090

Closed
sapphi-red wants to merge 1 commit intomainfrom
try-native-react-refresh-wrapper-plugin
Closed

wip: try native react-refresh-wrapper plugin#5090
sapphi-red wants to merge 1 commit intomainfrom
try-native-react-refresh-wrapper-plugin

Conversation

@sapphi-red
Copy link
Member

Creating a PR for future reference

(it doesn't improve perf much)

@sapphi-red sapphi-red closed this Jun 27, 2025
@sapphi-red sapphi-red deleted the try-native-react-refresh-wrapper-plugin branch June 27, 2025 11:00
@netlify
Copy link

netlify bot commented Jun 27, 2025

Deploy Preview for rolldown-rs failed.

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

@github-actions
Copy link
Contributor

Benchmarks Rust

  • target: main(0ba87d7)
  • pr: try-native-react-refresh-wrapper-plugin(e63f2ad)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.00     75.8±2.80ms        ? ?/sec    1.05     79.4±1.79ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.00     85.4±2.03ms        ? ?/sec    1.08     91.8±2.16ms        ? ?/sec
bundle/bundle@rome_ts                                        1.00    112.6±1.94ms        ? ?/sec    1.01    114.0±2.86ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    131.1±2.25ms        ? ?/sec    1.04    136.5±3.03ms        ? ?/sec
bundle/bundle@threejs                                        1.00     40.6±2.25ms        ? ?/sec    1.06     43.1±1.05ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.00     50.3±2.25ms        ? ?/sec    1.05     52.6±0.95ms        ? ?/sec
bundle/bundle@threejs10x                                     1.00    431.6±5.03ms        ? ?/sec    1.02    441.4±5.71ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    500.7±2.74ms        ? ?/sec    1.01    505.7±7.09ms        ? ?/sec
scan/scan@rome_ts                                            1.00     87.8±1.23ms        ? ?/sec    1.03     90.2±1.90ms        ? ?/sec
scan/scan@threejs                                            1.01     30.9±1.64ms        ? ?/sec    1.00     30.7±0.58ms        ? ?/sec
scan/scan@threejs10x                                         1.00    323.4±6.94ms        ? ?/sec    1.00    321.9±5.85ms        ? ?/sec

graphite-app bot pushed a commit that referenced this pull request Sep 12, 2025
Rebased #5090 and added the missing features.

The reason why #5090 alone did not improve performance was because the refresh wrapper plugin injects `import * as RefreshRuntime from "/@react-refresh";` which would cause this resolveId hook to be called for all react files.
https://github.com/vitejs/vite-plugin-react/blob/f63bb83c7070d07ae5f488cdc9ac643bac61ba59/packages/plugin-react/src/index.ts#L433-L440
In this case the filter doesn't help much.
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.

1 participant