Fallback to config.createResolver for client and ssr environments in @tailwindcss/vite#19679
Conversation
config.createResolver for client and ssr environmentsconfig.createResolver for client and ssr environments in @tailwindcss/vite
|
No actionable comments were generated in the recent review. 🎉 WalkthroughVite type imports were expanded to include 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
RobinMalfait
left a comment
There was a problem hiding this comment.
Thanks! Added an integration test to make sure this solves the issue you are seeing.
Summary
Sometimes even if Vite Envrionment API is available, some plugins are still override
config.createResolverfunction to inject own aliasesSince technically
config.createResolverwas only properly deprecated in Vite 7.0.0, it's still a valid(-ish) to do so, even if it wasn't ever officially supportedVite 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