Repository navigation
Closed
Closed
Copy link
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)regressionThe issue only appears after a new release
Description
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 +4sValidations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs and the Rolldown-related guide.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)regressionThe issue only appears after a new release
Activity
hi-ogawa commentedon Sep 10, 2025
Does it also reproduce on latest
vite?hi-ogawa commentedon Sep 10, 2025
I have moved the issue to main vite repo. Here is a simplified reproduction https://stackblitz.com/github/hi-ogawa/reproductions/tree/main/vite-20743-non-html-tailwind-full-reload The change is likely due to #20391.
You can workaround the issue by adding a following plugin:
[-]After 7.1 Vite is not hot reloading pages on save[/-][+]After 7.1 Vite is not hot reloading pages when changing php files with tailwindcss[/+]sapphi-red commentedon Sep 10, 2025
This is expected because Vite doesn't know about
*.phpand shouldn't treat*.phpspecially.The plugin above or
vite-plugin-full-reloadshould work.furkantaskin commentedon Sep 11, 2025
Before 7.1 update on both Vite and Rolldown Vite, PHP was working perfectly fine. I'm not bundling the project. Using Vite just to build assets using Tailwind and TypeScript. After 7.1 update Vite started to ignore hot reload but still triggers hmr operation. I'm not expecting Vite to support PHP cuz I know it's not in Vite's nature. But as I said at least Vite was detecting changes on PHP files and triggers full reload.
hi-ogawa commentedon Sep 11, 2025
The behavior you are seeing is fairly specific to tailwind and there was an undesired behavior related to this, which is fixed by #20391. For your use case, we recommend triggering full-reload via custom plugin as it would work in general.