question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Live reload doesn't work with Tailwind

See original GitHub issue

Describe the bug

After installing Tailwind, it stopped live reloading for changes on index.html. It’s weird because it logs this counter below and it does reload for main.js.

[vite]  (x2)

I’m assuming it’s still detecting changes but they are not being sent to the client.

Thanks.

Reproduction

https://stackblitz.com/edit/vitejs-vite-bbqmud?file=index.html&terminal=dev

System Info

System:
  OS: Linux 5.10 Ubuntu 20.04.4 LTS (Focal Fossa)
  CPU: (12) x64 AMD Ryzen 5 1600 Six-Core Processor
  Memory: 11.39 GB / 12.44 GB
  Container: Yes
  Shell: 5.0.17 - /bin/bash
Binaries:
  Node: 17.6.0 - ~/.asdf/installs/nodejs/17.6.0/bin/node
  npm: 8.5.1 - ~/.asdf/plugins/nodejs/shims/npm
npmPackages:
  vite: ^2.9.2 => 2.9.5

Used Package Manager

npm

Logs

No response

Validations

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
brilloutcommented, Apr 25, 2022
1reaction
k1sul1commented, May 1, 2022

I was very close to submitting another issue related to #6695, begging for the option to allow disabling forced reloads without disabling HMR altogether, since the Tailwind config was causing those in my “legacy PHP application”. The workaround in that thread doesn’t work anymore, and the thread where discussion was supposed to continue is dead.

Luckily for me, It doesn’t do that anymore after updating to 2.9.6! Was running 2.9.0 previously.

Posting this comment in case anyone else is having the same issue and thinks they need the option, that you maintainers been opposed about adding since it would have a chance of being a footgun. That thread comes up on Google while troubleshooting, so I think it’s beneficial that it contains a link to this thread. After all, finding this issue made me realise updating might fix my issue. I probably wouldn’t have updated Vite otherwise, due to the traumas Webpack upgrades gave me.

Thanks for the great work!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hot reload not working properly for Tailwind on WSL2
Just started a new personal project with Remix & TailwindCSS. Everything works fine with raw Remix install, but the css hot reload is...
Read more >
Wiring up real-time/live browser code reloads with Tailwind
I'm trying to get my app/environment wired up to achieve the following: App with Tailwind CSS Hot reloading in the browser for UI...
Read more >
Adam Wathan on Twitter: "@jeffscottward @tailwindcss ...
The hot-reloading isn't a Tailwind problem, it's a Next problem. I literally spent 5 minutes to do it for you this morning. It...
Read more >
Spring live reload and webpack out of sync
I've been working on a new Spring Boot MVC project which uses Freemarker, Tailwind CSS, and Alpine.js + some custom JavaScript for the...
Read more >
Difference between Hot Reloading and Live ... - GeeksforGeeks
What is Hot Reloading ? · If you are into deep navigation, hot reloading will not work properly. In this case, you have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found