Skip to content

docs: fix optimizeDeps type links#21823

Merged
sapphi-red merged 3 commits into
mainfrom
docs-optimize-deps-links
Mar 12, 2026
Merged

docs: fix optimizeDeps type links#21823
sapphi-red merged 3 commits into
mainfrom
docs-optimize-deps-links

Conversation

@bluwy
Copy link
Copy Markdown
Member

@bluwy bluwy commented Mar 12, 2026

Currently they look a bit weird, https://main.vite.dev/config/dep-optimization-options#optimizedeps-rolldownoptions:

image image

This PR fixes it:

image image

I've updated the esbuildOptions to use the same type as rolldownOptions as that's what it is internally now. Not sure if it's intended to reference the old type.

I also removed the link to Omit since I think it's not necessary to link typescript builtins, and we have other types not linking it as well. Happy to revert that if we feel otherwise.

@bluwy bluwy added the documentation Improvements or additions to documentation label Mar 12, 2026
@sapphi-red
Copy link
Copy Markdown
Member

I've updated the esbuildOptions to use the same type as rolldownOptions as that's what it is internally now. Not sure if it's intended to reference the old type.

I think you saw the wrong one. esbuildOptions uses DepsOptimizerEsbuildOptions.

/**
* Options to pass to esbuild during the dep scanning and optimization
*
* Certain options are omitted since changing them would not be compatible
* with Vite's dep optimization.
*
* - `external` is also omitted, use Vite's `optimizeDeps.exclude` option
* - `plugins` are merged with Vite's dep plugin
*
* https://esbuild.github.io/api
*
* @deprecated Use `rolldownOptions` instead.
*/
esbuildOptions?: DepsOptimizerEsbuildOptions

@bluwy
Copy link
Copy Markdown
Member Author

bluwy commented Mar 12, 2026

Indeed I was 🤦 fixed now

Copy link
Copy Markdown
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@sapphi-red sapphi-red merged commit 87cc63d into main Mar 12, 2026
16 checks passed
@sapphi-red sapphi-red deleted the docs-optimize-deps-links branch March 12, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants