You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No deprecation warning when optimizeDeps.rollupOptions is set in the config #23749
optimizeDeps.rollupOptions is deprecated in favor of optimizeDeps.rolldownOptions, but setting it directly in vite.config prints no deprecation warning. The value still works (it is mapped to rolldownOptions), so there is nothing telling users to migrate before the option is removed.
The same option returned from a plugin's config hook, or set under environments.client.optimizeDeps, does print the warning.
The cause is in setupRollupOptionCompat (packages/vite/src/node/utils.ts): it runs rolldownOptions ??= rollupOptions before checking rollupOptions && rolldownOptions !== rollupOptions. When only rollupOptions is set, both point to the same object by the time of the check, so the warning is skipped.
Expected: the deprecation warning is printed once, same as when a plugin sets the option.
Output of npm run build:plugin (nothing like this appears for npm run build):
`optimizeDeps.rollupOptions` / `ssr.optimizeDeps.rollupOptions` is deprecated. Use `optimizeDeps.rolldownOptions` instead. Note that this option may be set by a plugin. Set VITE_DEPRECATION_TRACE=1 to see where it is called.
Activity