Open bluwy opened 2 weeks ago
We should be able to support this by doing something similar to the vite:import-glob
plugin.
https://github.com/vitejs/vite/blob/ad9a987aa4ae3d9e246541d918bb2ec331bbccae/packages/vite/src/node/plugins/importMetaGlob.ts#L91-L105
Describe the bug
I don't remember if we've discussed before, but tailwindcss can't seem to track new files due to limitations of
this.addWatchFile
: https://github.com/vitejs/vite/blob/fe30349d350ef08bccd56404ccc3e6d6e0a2e156/packages/vite/src/node/plugins/css.ts#L1433-L1444I'm not sure if we want to special case this, or leave it to tailwind's next major to possibly fix things.
Found this from https://github.com/withastro/astro/issues/12255
Related: https://github.com/vitejs/vite/issues/15460 (but not exactly the same I think)
Reproduction
https://stackblitz.com/edit/vitejs-vite-nk6bcl?file=index.html&terminal=dev
Steps to reproduce
index.html
and create a newfoo.html
at the root for example and paste the content in it.text-red-500
in the pasted content to something else new, liketext-green-500
After a full server restart and reload the page, the color is then correctly applied
System Info
Used Package Manager
npm
Logs
No response
Validations