Skip to content

After 7.1 Vite is not hot reloading pages when changing php files with tailwindcss #20743

@furkantaskin

Description

@furkantaskin

Describe the bug

I am using customized vite configuration with vanilla PHP backend. Before 7.1 update hmr was working fine for both TS, PHP and CSS files. After 7.1 page reload has stopped working. Whenever I update PHP files, it triggers
"hmr update /src/style.css?direct" thus it injects CSS but not reloading the page. I need to manually refresh the page for it. On CLI, it shows hmr update but not triggering page reload.

Reproduction

https://github.com/furkantaskin/rolldown-vite-hmr-problem

Steps to reproduce

Running npm run dev and updating any content of PHP file is enough to reproduce the issue.

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (12) x64 12th Gen Intel(R) Core(TM) i7-1255U
    Memory: 2.17 GB / 15.73 GB
  Binaries:
    Node: 22.19.0 - C:\Program Files\nodejs\node.EXE
    npm: 11.5.2 - C:\Program Files\nodejs\npm.CMD
    bun: 1.2.21 - ~\.bun\bin\bun.EXE
  Browsers:
    Edge: Chromium (140.0.3485.54)
    Internet Explorer: 11.0.26100.1882
  npmPackages:
    rolldown-vite: ^7.1.8 => 7.1.8

Project Direcotry: E:\www (using IIS and Windows Virtual Disk for E drive)

Used Package Manager

bun

Logs

Current Vite Log
  vite:deps (client) Hash is consistent. Skipping. Use --force to override. +0ms

  ROLLDOWN-VITE v7.1.8  ready in 463 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
  vite:resolve 1.38ms /@vite/client -> E:/www/vite_test/node_modules/rolldown-vite/dist/client/client.mjs +0ms
  vite:resolve 3.86ms /src/style.css?direct -> E:/www/vite_test/src/style.css?direct +1ms
  vite:resolve 2.45ms /src/main.ts -> E:/www/vite_test/src/main.ts +1ms
  vite:load 3.01ms [fs] /@vite/client +0ms
  vite:resolve 5.05ms @vite/env -> E:/www/vite_test/node_modules/rolldown-vite/dist/client/env.mjs +26ms
  vite:import-analysis 13.91ms [1 imports rewritten] node_modules/rolldown-vite/dist/client/client.mjs +0ms
  vite:transform 26.54ms /@vite/client +0ms
  vite:time 62.45ms /@vite/client +0ms
  vite:load 64.75ms [fs] /src/style.css?direct +63ms
  vite:resolve 0.08ms tailwindcss -> null +50ms
  vite:load 90.31ms [fs] /src/main.ts +25ms
  vite:load 173.29ms [fs] /node_modules/rolldown-vite/dist/client/env.mjs +112ms
  vite:import-analysis [skipped] src/style.css?direct +175ms
  vite:transform 138.97ms /src/style.css?direct +175ms
  vite:time 215.43ms /src/style.css +148ms
  vite:import-analysis 0.08ms [no imports] node_modules/rolldown-vite/dist/client/env.mjs +7ms
  vite:transform 9.42ms /node_modules/rolldown-vite/dist/client/env.mjs +7ms
  vite:time 120.52ms /node_modules/rolldown-vite/dist/client/env.mjs +7ms
  vite:import-analysis 0.20ms [no imports] src/main.ts +3ms
  vite:transform 123.49ms /src/main.ts +2ms
  vite:time 219.71ms /src/main.ts +3ms
  vite:hmr [file change] index.php +0ms
14:46:07 [vite] (client) hmr update /src/style.css?direct
  vite:hmr (ssr) [no modules matched] index.php +44ms
  vite:load 1.79ms [fs] /src/style.css?direct +4s
  vite:import-analysis [skipped] src/style.css?direct +4s
  vite:transform 29.40ms /src/style.css?direct +4s
  vite:time 33.21ms /src/style.css +4s

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    p3-minor-bugAn edge case that only affects very specific usage (priority)regressionThe issue only appears after a new release

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions