diff --git a/src/hmr.ts b/src/hmr.ts index 25d3c990..55c35232 100644 --- a/src/hmr.ts +++ b/src/hmr.ts @@ -35,6 +35,10 @@ export default function (tailwindConfig: any = {}, rootDir: string, cssPath: str } }) }) + if (ctx.file.includes('/content-cache/')) { + // @ts-ignore + return true + } } } }; diff --git a/src/module.ts b/src/module.ts index 6c3b1117..7951a43f 100644 --- a/src/module.ts +++ b/src/module.ts @@ -204,10 +204,6 @@ export default defineNuxtModule({ postcssOptions.plugins = postcssOptions.plugins || {} postcssOptions.plugins['tailwindcss/nesting'] = postcssOptions.plugins['tailwindcss/nesting'] ?? {} postcssOptions.plugins['postcss-custom-properties'] = postcssOptions.plugins['postcss-custom-properties'] ?? {} - // Hot fix for Tailwind refreshing in dev when changing markdown files in content - if (nuxt.options.dev && tailwindConfig.content) { - tailwindConfig.content = tailwindConfig.content.filter((path: string) => !path.includes('/content-cache/parsed')) - } postcssOptions.plugins.tailwindcss = tailwindConfig if (isNuxt2()) {