Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 BUG: HMR doesn't work automatically with Tailwind CSS, WindiCSS, UnoCSS #1028

Closed
RafidMuhymin opened this issue Aug 5, 2021 · 11 comments

Comments

@RafidMuhymin
Copy link
Member

What package manager are you using?

yarn

What operating system are you using?

Windows

Describe the Bug

If you are using TailwindCSS, HMR doesn't work automatically in the dev environment when you add classes. You'll have to go to the stylesheet where you have included the @tailwind directives and resave that.

Steps to Reproduce

  1. npm init astro -- --template with-tailwindcss
  2. Error! Describe what went wrong (and what was expected instead)...
    HMR should be triggered just after adding a class or classes without any workaround.

Link to Minimal Reproducible Example (Optional)

https://github.com/snowpackjs/astro/tree/main/examples/with-tailwindcss

@RafidMuhymin RafidMuhymin changed the title 馃悰 BUG: 馃悰 BUG: HMR doesn't work automatically with Tailwind CSS Aug 5, 2021
@aFuzzyBear
Copy link
Contributor

My resolve to this issue was to restart the VSCode editor once you have tailwinds setup, that way it picks up the file and it should 馃 work,

@RafidMuhymin
Copy link
Member Author

My resolve to this issue was to restart the VSCode editor once you have tailwinds setup, that way it picks up the file and it should 馃 work,

Well, I have reloaded and loaded vscode multiple times since I have set up tailwind. But that didn't solve the problem. And how can reloading vscode solve the problem?! Something in snowpack or Astro is maybe misconfigured. How can vscode have a relation to this?

@drwpow drwpow added this to Needs Triage in 馃悰 Bug Tracker via automation Aug 19, 2021
@matthewp
Copy link
Contributor

This will need to be tackled in the new compiler infrastructure since its snowpack related.

@matthewp matthewp moved this from Needs Triage to Blocked in 馃悰 Bug Tracker Aug 25, 2021
@RafidMuhymin
Copy link
Member Author

This bug has been fixed!

馃悰 Bug Tracker automation moved this from Blocked to Done Sep 19, 2021
@brycewray
Copy link
Contributor

This bug has been fixed!

Apparently unfixed in 0.21 beta released today. (?)

@RafidMuhymin
Copy link
Member Author

This bug has been fixed!

Apparently unfixed in 0.21 beta released today. (?)

How are you importing TailwindCSS? There are still some issues with Cache Invalidation

@RafidMuhymin RafidMuhymin reopened this Oct 30, 2021
馃悰 Bug Tracker automation moved this from Done to Needs Triage Oct 30, 2021
@brycewray
Copy link
Contributor

This bug has been fixed!

Apparently unfixed in 0.21 beta released today. (?)

How are you importing TailwindCSS? There are still some issues with Cache Invalidation

I know the team is still working on the docs for the beta, but I did it according to the latest example repos, particularly the one that's specifically about using TWCSS, as well as a brief discussion I had in the Astro Discord after the beta was released.

@drwpow
Copy link
Member

drwpow commented Nov 2, 2021

Yes this is a known bug in 0.21 that we decided to not block the beta release on. I鈥檓 working on this now! Along with Windi and UnoCSS and other related libraries.

@drwpow drwpow changed the title 馃悰 BUG: HMR doesn't work automatically with Tailwind CSS 馃悰 BUG: HMR doesn't work automatically with Tailwind CSS, WindiCSS, UnoCSS Nov 2, 2021
@drwpow drwpow moved this from Needs Triage to Prioritized in 馃悰 Bug Tracker Nov 2, 2021
@FredKSchott
Copy link
Member

Thanks for the report! We believe that this has been fixed in astro v0.21, going out today. Let us know if you can still reproduce the issue after updating to v0.21 and we'll be happy to take a look.

Given that this issue touches a lot of different libraries, if you run into an problem on v0.21 please file a new issue with a single reproduction that we can help debug on!

馃悰 Bug Tracker automation moved this from Prioritized to Done Nov 19, 2021
@electroheadfx
Copy link

Any news about the HRM update ? I have the same issue with Unocss, the style is updated only on a server restart.

my setup is:
"astro": "^0.22.20",
"unocss": "^0.24.3"

@RafidMuhymin
Copy link
Member Author

@electroheadfx Check #2410

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

7 participants