-
-
Notifications
You must be signed in to change notification settings - Fork 199
fix(react): use rolldownOptions instead of deprecated rollupOptions in optimizeDeps on rolldown-vite #976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@copilot the issue is likely in react plugin instead of rsc plugin vite-plugin-react/packages/plugin-react/src/index.ts Lines 165 to 167 in fc76c72
|
Replace deprecated `optimizeDeps.rollupOptions` with `optimizeDeps.rolldownOptions` in plugin-react to fix CI deprecation warning when using rolldown-vite. Fixes the CI error where tests were failing due to stderr containing: "`optimizeDeps.rollupOptions` / `ssr.optimizeDeps.rollupOptions` is deprecated. Use `optimizeDeps.rolldownOptions` instead." Co-authored-by: hi-ogawa <4232207+hi-ogawa@users.noreply.github.com>
Correct! I've already fixed that in commit 4115707 by changing |
|
Ah, I noticed that we have the same in other plugins as well. |
| datasource | package | from | to | | ---------- | -------------------- | ----- | ----- | | npm | @vitejs/plugin-react | 5.1.0 | 5.1.1 | ## [v5.1.1](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#511-2025-11-12) ##### Update code to support newer `rolldown-vite` ([#976](vitejs/vite-plugin-react#976)) `rolldown-vite` will remove `optimizeDeps.rollupOptions` in favor of `optimizeDeps.rolldownOptions` soon. This plugin now uses `optimizeDeps.rolldownOptions` to support newer `rolldown-vite`. Please update `rolldown-vite` to the latest version if you are using an older version.
| datasource | package | from | to | | ---------- | -------------------- | ----- | ----- | | npm | @vitejs/plugin-react | 5.1.0 | 5.1.1 | ## [v5.1.1](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#511-2025-11-12) ##### Update code to support newer `rolldown-vite` ([#976](vitejs/vite-plugin-react#976)) `rolldown-vite` will remove `optimizeDeps.rollupOptions` in favor of `optimizeDeps.rolldownOptions` soon. This plugin now uses `optimizeDeps.rolldownOptions` to support newer `rolldown-vite`. Please update `rolldown-vite` to the latest version if you are using an older version.
| datasource | package | from | to | | ---------- | -------------------- | ----- | ----- | | npm | @vitejs/plugin-react | 5.1.0 | 5.1.1 | ## [v5.1.1](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#511-2025-11-12) ##### Update code to support newer `rolldown-vite` ([#976](vitejs/vite-plugin-react#976)) `rolldown-vite` will remove `optimizeDeps.rollupOptions` in favor of `optimizeDeps.rolldownOptions` soon. This plugin now uses `optimizeDeps.rolldownOptions` to support newer `rolldown-vite`. Please update `rolldown-vite` to the latest version if you are using an older version.
| datasource | package | from | to | | ---------- | -------------------- | ----- | ----- | | npm | @vitejs/plugin-react | 5.1.0 | 5.1.1 | ## [v5.1.1](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#511-2025-11-12) ##### Update code to support newer `rolldown-vite` ([#976](vitejs/vite-plugin-react#976)) `rolldown-vite` will remove `optimizeDeps.rollupOptions` in favor of `optimizeDeps.rolldownOptions` soon. This plugin now uses `optimizeDeps.rolldownOptions` to support newer `rolldown-vite`. Please update `rolldown-vite` to the latest version if you are using an older version.
Description
Fixes #[issue_number] - CI failures in plugin-rsc e2e tests due to deprecation warning in stderr.
When
rolldownVersionis detected in Vite, plugin-react was using the deprecatedoptimizeDeps.rollupOptionsproperty. Vite 7 with Rolldown requiresoptimizeDeps.rolldownOptionsinstead.Changed:
packages/plugin-react/src/index.ts: UpdatedoptimizeDeps.rollupOptions→optimizeDeps.rolldownOptionsin the automatic JSX runtime configuration pathThe deprecation warning was preventing tests from passing since they assert stderr is empty.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
workers.cloudflare.comnode /home/REDACTED/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/examples/starter-cf-single/node_modules/.bin/../vite/bin/vite.js(dns block)node /home/REDACTED/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/examples/starter-cf-single/node_modules/.bin/../vite/bin/vite.js preview(dns block)node /home/REDACTED/work/vite-plugin-react/vite-plugin-react/packages/plugin-rsc/examples/react-router/node_modules/.bin/../vite/bin/vite.js -c ./cf/vite.config.ts(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.