saicaca / fuwari

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

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

Open golam71 opened 1 week ago

golam71 commented 1 week 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 week 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 week 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 week 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 week ago

I succeeded in activating it.

L4Ph commented 1 week 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 week ago

pls me assign @saicaca

thedevstone commented 1 week ago

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