Skip to content

Vite plugin triggers hard reload when touching some file that's not in the module graph #19720

@ulrichstark

Description

@ulrichstark

What version of Tailwind CSS are you using?

v4.2.1

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

Vite 7.3.1

What version of Node.js are you using?

v24.10.0

What browser are you using?

Chrome

What operating system are you using?

macOS

Reproduction URL

https://github.com/ulrichstark/repro-tailwind-hard-reload-when-deleting-file-not-in-module-graph

Run the dev server in my repro, open the page and then delete someFile.json.

Describe your issue

Probably since #19670, when touching some file that's not in the module graph, the tailwind vite plugin triggers an hard reload in the browser. It seems like the target of the mentioned PR was to reload on every change of a file that's not in a module graph. I don't think this should be the expected behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions