Fix crash when using @tailwindcss/vite using deno v2.8.x#20245
Conversation
Confidence Score: 5/5Safe to merge — the change is a minimal, well-scoped defensive guard that cannot regress existing behavior. The fix wraps a two-line URL construction block in a try/catch and falls back to returning the unmodified resolver result on any exception. Every existing code path that succeeded before still succeeds; only the previously-crashing path now recovers gracefully. No logic is removed or reordered. No files require special attention. Reviews (2): Last reviewed commit: "update changelog" | Re-trigger Greptile |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
This PR might fix an issue where resolvers don't work on deno v2.8.x (they do work on deno v2.7.x) when using
@tailwindcss/vite.This happens when the
context.parentURLis not actually a URL at all, and therefore thenew URL(…)just crashes. This PR will fallback to the incoming result for files that are not passed proper URLs.Fixes: #20232
Test plan
Can't seem to figure out how to test this in the reproduction issue without publishing first. So going to merge this and test the insiders version instead.Deno v2.7:

Deno v2.8:

Deno v2.8 +

@tailwindcss/vite@insiders: