Skip to content

Tailwind 4.1.8 + vite in vue not hot reloading classes #18236

Open
@Cafezinho

Description

@Cafezinho

Tailwind classes do not apply style when hot reloading classes that were not being used before. Need to restart dev server for the styles to apply. I have already tried disabling purge altogether but still did not work. Tried different tailwind v4 versions as well, neither worked. I am using tailwind classes with prefix tw.

Downgraded to v3 to test it out and hot reload works wonders. But my prefix setup to work in conflict with vuetify is wrapped along v4, so I upgraded back. Would be nice to have Hot reload.

What version of Tailwind CSS are you using?

v4.1.8

What build tool (or framework if it abstracts the build tool) are you using?

Vue 2.7, Vite 4.5.0, tailwindcss/vite: 4.1.8

What version of Node.js are you using?
v16.20

What browser are you using?

For example: Chrome, Safari, or N/A

What operating system are you using?

For example: macOS, Windows

Reproduction URL

A Tailwind Play link or public GitHub repo that includes a minimal reproduction of the bug. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private/confidential, since we want a link to a separate, isolated reproduction anyways.

A reproduction is required when filing an issue — any issue opened without a reproduction will be closed and you'll be asked to create a new issue that includes a reproduction. We're a small team and we can't keep up with the volume of issues we receive if we need to reproduce each issue from scratch ourselves.

Describe your issue

Describe the problem you're seeing, any important steps to reproduce and what behavior you expect instead.

Activity

wongjn

wongjn commented on Jun 5, 2025

@wongjn
Collaborator

Please consider providing a public GitHub repo that includes a minimal reproduction of the unexpected behavior.

IsaacSomething

IsaacSomething commented on Jun 8, 2025

@IsaacSomething

I not sure if this is connected, but i am experiencing the same issue with angular + vite + tailwind. I created a post in the angalar cli with a minimal reproduction in stackbliz

angular/angular-cli#30434

PrzemekTk

PrzemekTk commented on Jun 11, 2025

@PrzemekTk

I'm facing the same...

npm create vite@latest with: vue + typescript
and then make steps from https://tailwindcss.com/docs/installation/using-vite

None of tailwind classes working

mattremmel

mattremmel commented on Jun 18, 2025

@mattremmel

I'm able to reproduce the same thing in a project for work. Utility classes don't seem to hot reload if they haven't been used before, but if I restart storybook, the utility classes that weren't previously working, will then display correctly.

I'm not able to link to this project directly because its internal, but I will try to make a reproducible example in a separate repo tomorrow.

Vite: 6.0.0
Tailwindcss: 4.1.10
Storybook: 9.0.9

nathan-de-pachtere

nathan-de-pachtere commented on Jun 19, 2025

@nathan-de-pachtere

Same issue with that config :

"vue": "^3.5.17",
"@vitejs/plugin-vue": "^5.2.3",

"vite": "^6.3.5",
"@tailwindcss/vite": "^4.1.10",
"tailwindcss": "^4.1.10"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @nathan-de-pachtere@mattremmel@wongjn@Cafezinho@IsaacSomething

        Issue actions

          Tailwind 4.1.8 + vite in vue not hot reloading classes · Issue #18236 · tailwindlabs/tailwindcss