Vite HMR update is conflicting with Windi JIT?
See original GitHub issueDescribe the bug
Windi HMR/JIT doesn’t generate new Utility classes on demand (after the first load)
Minimal reproduction ensure you’re on the v2.5.4 on vite after that run up the sever and make changes to your elements (ie add/modify new utils), you can see an example of this here on the WindiCSS Discord
temporary fix
downgrade to vite@2.5.3
and everything works fine and dandy again
Versions
- vite-plugin-windicss:
1.4.4
- vite:
2.5.4
- framework(vue/react/svelte/etc):
svelte-(ts)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Vite + Tailwind JIT -> broken HMR · Issue #4147 · vitejs/vite
Describe the bug When I add Tailwind (JIT mode) to my PostCSS config, HMR doesn't kick-in for Vue templates anymore.
Read more >Patching Vite HMR To Work With Tailwind JIT - Mohammed A.
In this article, I will walk you through how we fixed the issue. UPDATE 19/12/2021: This solution is no longer needed, it seems...
Read more >Windi CSS HMR not working for Svelte + vite app
Even the Devtool changes are working fine, only HMR is not working. Not sure if I am missing anything else.
Read more >Integration for Vite
Check out the speed comparison between Windi CSS and Tailwind CSS on Vite. Install #. Install the package: npm i -D vite-plugin-windicss windicss....
Read more >Reimagine Atomic CSS
To achieve this, both Windi CSS and Tailwind JIT take the approach of pre-scanning your source code. Here is a simple example of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This was fixed in vite 2.6.14
https://github.com/vitejs/vite/blob/release/2.6.x/packages/vite/CHANGELOG.md#2614-2021-11-09
svelte is currently used first, though that could be changed (depends on plugin order in user config). It could work if windi was first and didn’t return a change from handleHotUpdate, but that feels rather hacky to me.