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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
golam71 opened this issue Sep 25, 2024 · 8 comments
Open

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

golam71 opened this issue Sep 25, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@golam71
Copy link

golam71 commented Sep 25, 2024

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
Copy link
Contributor

L4Ph commented Sep 26, 2024

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
Copy link
Author

golam71 commented Sep 26, 2024

@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
Copy link
Contributor

L4Ph commented Sep 26, 2024

@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
Copy link
Contributor

L4Ph commented Sep 26, 2024

I succeeded in activating it.

@L4Ph
Copy link
Contributor

L4Ph commented Sep 26, 2024

@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
Copy link
Contributor

L4Ph commented Sep 26, 2024

pls me assign @saicaca

@thedevstone
Copy link

thedevstone commented Sep 26, 2024

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

@L4Ph
Copy link
Contributor

L4Ph commented Oct 29, 2024

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

@saicaca @golam71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants