Tailwind warning: including a pattern matching all of `node_modules` in configuration causes serious performance issues
I use the recommended tailwind config in README:
```
import type { Config } from 'tailwindcss';
export default {
content: ['./src/**/*.{html,js,svelte,ts}', './node_modules/svelte-5-ui-lib/**/*.{html,js,svelte,ts}'],
darkMode: 'selector',
......
},
} as Config;
```
When I run `pnpm dev` I get this warning:
warn - Your `content` configuration includes a pattern which looks like it's accidentally matching all of `node_modules` and can cause serious performance issues.
warn - Pattern: `../svelte-5-ui-lib/**/*.ts`
warn - See our documentation for recommendations:
warn - https://tailwindcss.com/docs/content-configuration#pattern-recommendations
As for performance, I notice when I make some little changes in `app.css` where I write extra styles, the browser takes a long time(30s on a modern PC) to to refresh, leading to very bad developing experience.
3 条评论