tailwindcss/integrations
Andrey Viktorov bc6e4b85bf
Fallback to config.createResolver for client and ssr environments 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](https://github.com/vitejs/vite/pull/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>
2026-02-17 19:59:57 +00:00
..
cli CLI: Emit comment when source maps are saved to files (#19447) 2025-12-18 15:02:27 -05:00
oxide chore: fix some typos in comments (#19475) 2025-12-22 13:09:19 +00:00
postcss chore: fix some typos in comments (#19475) 2025-12-22 13:09:19 +00:00
upgrade workaround: increase some CI timeouts 2026-01-06 20:58:00 +01:00
vite Fallback to config.createResolver for client and ssr environments in @tailwindcss/vite (#19679) 2026-02-17 19:59:57 +00:00
webpack Add @tailwindcss/webpack loader for Tailwind CSS v4 (#19610) 2026-01-29 14:16:31 +00:00
package.json Update dedent 1.7.0 → 1.7.1 (patch) (#19484) 2025-12-24 10:31:02 -05:00
utils.ts Add @tailwindcss/webpack loader for Tailwind CSS v4 (#19610) 2026-01-29 14:16:31 +00:00
vitest.config.ts Improve integration tests (stability + performance) (#15125) 2024-12-12 13:48:56 +01:00