From bb6a10937c7e1434db39919fbb4df4a8982dba7f Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Wed, 24 Jun 2026 18:14:13 +0200 Subject: [PATCH] use `.ts` instead of `.css` In newer Vite versions this extension matters, without the vite/resolvers integration tests won't work. Since this is still a placeholder fake file where Vite will run `dirname` on, the actual file doesn't really matter as long as it's relative to this file. --- packages/@tailwindcss-vite/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@tailwindcss-vite/src/index.ts b/packages/@tailwindcss-vite/src/index.ts index a9c9ad5cf..9796ff0d0 100644 --- a/packages/@tailwindcss-vite/src/index.ts +++ b/packages/@tailwindcss-vite/src/index.ts @@ -45,7 +45,7 @@ function createCustomResolver( // It does matter that this is a file, otherwise we would go up a directory, // which means that we would be resolving files from a parent folder first, // instead of the current folder we are in. - let importer = path.resolve(base, '__placeholder__.css') + let importer = path.resolve(base, '__placeholder__.ts') for (let resolver of resolvers) { let resolved = await resolver(id, importer)