Replies: 2 comments
-
👀 |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm not sure if this will be helpful as my setup and error are different, but I was seeing an issue seemingly caused by tailwindcss v4 and HMR. So I hope it is helpful in some capacity. Environment
IssueHMR cache invalidation bug with dynamic Tailwind classes using template literals (e.g., SolutionAdding the following to my Vite server configuration resolved the issue: export default defineConfig({
server: {
watch: {
usePolling: true,
interval: 1000,
ignored: ['!**/src/**/*.{js,ts,jsx,tsx}'],
},
},
optimizeDeps: {
exclude: ['@tailwindcss/vite'],
force: true,
},
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I recently updated TailwindCSS to v4, and now when I save files during development or when I refresh the page by pressing

f5
I get this error:The only way to fix it is to stop the dev server (
npm run dev
), restart it, and then the site works again.Has anyone else encountered this issue? What could be causing it, and how can I fix it permanently?
Setup Details:
Repo link:
https://github.com/Hetari/portfolio
Beta Was this translation helpful? Give feedback.
All reactions