Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: remove content from tailwindConfig.content in development
  • Loading branch information
Atinux committed Oct 7, 2022
1 parent 0171ce9 commit 51cfad7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/module.ts
Expand Up @@ -204,6 +204,10 @@ export default defineNuxtModule<ModuleOptions>({
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()) {
Expand Down

0 comments on commit 51cfad7

Please sign in to comment.