chore: deprecate ResolvedConfig.createResolver and recommend createIdResolver#20031
Merged
sapphi-red merged 4 commits intovitejs:mainfrom May 14, 2025
Merged
Conversation
sapphi-red
previously approved these changes
May 13, 2025
bluwy
reviewed
May 13, 2025
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
bluwy
approved these changes
May 14, 2025
sapphi-red
approved these changes
May 14, 2025
moonlitusun
pushed a commit
to moonlitusun/vite
that referenced
this pull request
May 25, 2025
…eIdResolver` (vitejs#20031) Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
RobinMalfait
added a commit
to tailwindlabs/tailwindcss
that referenced
this pull request
Feb 17, 2026
…ts in `@tailwindcss/vite` (#19679) <!-- 👋 Hey, thanks for your interest in contributing to Tailwind! **Please ask first before starting work on any significant new features.** It's never a fun experience to have your pull request declined after investing a lot of time and effort into a new feature. To avoid this from happening, we request that contributors create a discussion to first discuss any significant new features. For more info, check out the contributing guide: https://github.com/tailwindcss/tailwindcss/blob/main/.github/CONTRIBUTING.md --> ## Summary Sometimes even if Vite Envrionment API is available, some plugins are still override `config.createResolver` function to inject own aliases Since technically `config.createResolver` was only [properly deprecated](vitejs/vite#20031) in Vite 7.0.0, it's still a valid(-ish) to do so, even if it wasn't ever officially supported Vite already handles this in its internal css resolvers, but not exposes the code to do so as part of public API, so I've copied and adapted it Fixes #19677 ## Test plan Tested by copying built package into my repro from the issue, also ran vite integration tests --------- Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
RobinMalfait
added a commit
to tailwindlabs/tailwindcss
that referenced
this pull request
Feb 17, 2026
…ts in `@tailwindcss/vite` (#19679) <!-- 👋 Hey, thanks for your interest in contributing to Tailwind! **Please ask first before starting work on any significant new features.** It's never a fun experience to have your pull request declined after investing a lot of time and effort into a new feature. To avoid this from happening, we request that contributors create a discussion to first discuss any significant new features. For more info, check out the contributing guide: https://github.com/tailwindcss/tailwindcss/blob/main/.github/CONTRIBUTING.md --> ## Summary Sometimes even if Vite Envrionment API is available, some plugins are still override `config.createResolver` function to inject own aliases Since technically `config.createResolver` was only [properly deprecated](vitejs/vite#20031) in Vite 7.0.0, it's still a valid(-ish) to do so, even if it wasn't ever officially supported Vite already handles this in its internal css resolvers, but not exposes the code to do so as part of public API, so I've copied and adapted it Fixes #19677 ## Test plan Tested by copying built package into my repro from the issue, also ran vite integration tests --------- Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Tanstack team (@schiller-manuel) reported the issue about Tailwind' use of
config.createResolver, which breaks since Tanstack start has environment named "server" instead of "ssr" TanStack/router#4132.It looks like the comment is only in the implementation, but not in
ResolvedConfigtypes, so people don't notice. I copied the same jsdoc to the type.vite/packages/vite/src/node/config.ts
Lines 1526 to 1533 in 4795c4d