From 19c3ef65a2688bbc3333eb96bc31bc7252515649 Mon Sep 17 00:00:00 2001 From: Philipp Spiess Date: Wed, 28 Aug 2024 18:42:45 +0200 Subject: [PATCH] Remove debug steps --- integrations/vite/index.test.ts | 2 +- packages/@tailwindcss-vite/src/index.ts | 18 ++++++------------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/integrations/vite/index.test.ts b/integrations/vite/index.test.ts index 26f5e9bdc..ba9440421 100644 --- a/integrations/vite/index.test.ts +++ b/integrations/vite/index.test.ts @@ -219,7 +219,7 @@ import { }, ) - test.only( + test( 'watch mode', { fs: { diff --git a/packages/@tailwindcss-vite/src/index.ts b/packages/@tailwindcss-vite/src/index.ts index 6c09da0d7..4c102c8bb 100644 --- a/packages/@tailwindcss-vite/src/index.ts +++ b/packages/@tailwindcss-vite/src/index.ts @@ -266,8 +266,6 @@ export default function tailwindcss(): Plugin[] { ...(config.command === 'build' ? ['vite:css-post'] : []), ] - console.log('plugins') - console.log(config.plugins) cssPlugins = config.plugins.filter((plugin) => { return allowedPlugins.includes(plugin.name) }) @@ -275,8 +273,6 @@ export default function tailwindcss(): Plugin[] { // Scan index.html for candidates transformIndexHtml(html, context) { - onFileChange(context.filename) - let updated = scan(html, 'html') if (updated) { queueRebuild(isSSR) @@ -285,8 +281,6 @@ export default function tailwindcss(): Plugin[] { // Scan all non-CSS files for candidates transform(src, id, options) { - onFileChange(id) - if (id.includes('/.vite/')) return let extension = getExtension(id) if (extension === '' || extension === 'css') return @@ -311,12 +305,12 @@ export default function tailwindcss(): Plugin[] { // In serve mode, we treat cssModules as a set, ignoring the value. cssModules[id] = { content: '', handled: true } - // if (!options?.ssr) { - // // Wait until all other files have been processed, so we can extract - // // all candidates before generating CSS. This must not be called - // // during SSR or it will block the server. - // await server?.waitForRequestsIdle?.(id) - // } + if (!options?.ssr) { + // Wait until all other files have been processed, so we can extract + // all candidates before generating CSS. This must not be called + // during SSR or it will block the server. + await server?.waitForRequestsIdle?.(id) + } let code = await transformWithPlugins( this,