saicaca / fuwari

✨A static blog template built with Astro.
https://fuwari.vercel.app
MIT License
1.41k stars 326 forks source link

Why does it not reload the site when changes are made in dev mode? #192

Closed golam71 closed 2 days ago

golam71 commented 1 month ago

if i run the repo after doing pnpm install and pnpm ad sharp when i run pnpm run dev

it should hot reload like any other astro template so i can actually see the changes live how can i make it hot reload as in reload when i make changes to the code?

L4Ph commented 1 month ago

The astro dev command run by pnpm run dev supports hot reload and should be enabled by default. Or is it something like --watch?

golam71 commented 1 month ago

@L4Ph It still doesnt hot reload for me even if I use --watch can you confirm it works for you as in it hot reloads when you make changes with --watch?

L4Ph commented 1 month ago

@golam71 I have confirmed that HMR do not working. Currently, I'm in the middle of debugging, so I can't say for sure, but it appears that --watch is compiling a large amount of CSS from <style></style> tags written within .astro files.

I suspect this is the cause, but it may take some time to investigate.

L4Ph commented 1 month ago

I succeeded in activating it.

L4Ph commented 1 month ago

@golam71 It seems to be as expected. I think Tailwind CSS is basically written in base.css and compiled. I confirmed that HMR does not work when you write (such as @tailwind utilities) in <style lang="css"></style>.

I will issue a PR then.

L4Ph commented 1 month ago

pls me assign @saicaca

thedevstone commented 1 month ago

Incredible guys, i was struggling to find the cause and wow you already found it

L4Ph commented 3 weeks ago

It has been merged into main. Is it okay to close this issue?

@saicaca @golam71

golam71 commented 2 days ago

It works thank you very much :)