Skip to content

refactor(resolve): remove environmentsOptions parameter#18590

Merged
patak-cat merged 2 commits intovitejs:mainfrom
sapphi-red:refactor-resolve-remove-environments-option-parameter
Nov 6, 2024
Merged

refactor(resolve): remove environmentsOptions parameter#18590
patak-cat merged 2 commits intovitejs:mainfrom
sapphi-red:refactor-resolve-remove-environments-option-parameter

Conversation

@sapphi-red
Copy link
Copy Markdown
Member

Description

@sapphi-red sapphi-red added the p1-chore Doesn't change code behavior (priority) label Nov 6, 2024
@sapphi-red sapphi-red requested a review from patak-cat November 6, 2024 06:02
Comment on lines -184 to -190
/**
* @internal
* config.createResolver creates a pluginContainer before environments are created.
* The resolve plugin is especial as it works without environments to enable this use case.
* It only needs access to the resolve options.
*/
environmentsOptions?: Record<string, ResolvedEnvironmentOptions>,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I checked config.createResolver, but didn't find this to be used. Is this still used?

Copy link
Copy Markdown
Member

@patak-cat patak-cat left a comment

Choose a reason for hiding this comment

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

Ah, yes, nice! We were able to avoid this hack once we introduced PartialEnvironment. Thanks @sapphi-red!

@patak-cat patak-cat merged commit 3ef0bf1 into vitejs:main Nov 6, 2024
sapphi-red added a commit to vitejs/rolldown-vite that referenced this pull request Nov 6, 2024
@sapphi-red sapphi-red deleted the refactor-resolve-remove-environments-option-parameter branch November 6, 2024 09:30
moonlitusun pushed a commit to moonlitusun/vite that referenced this pull request May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p1-chore Doesn't change code behavior (priority)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants