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

🐛 BUG: Svelte components aren't reloaded without client property #3069

Closed
1 task
pyronaur opened this issue Apr 11, 2022 · 3 comments
Closed
1 task

🐛 BUG: Svelte components aren't reloaded without client property #3069

pyronaur opened this issue Apr 11, 2022 · 3 comments
Assignees

Comments

@pyronaur
Copy link

What version of astro are you using?

1.0.0-beta.7

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Mac

Describe the Bug

When a Svelte component is added without client property, it loses hot-reloading behavior for both DOM changes, but more frustratingly - style changes.

It seems that the style changes don't take effect until a parent astro component is updated.

---
import Test from '../components/Test.svelte';
---

<Test />

Reproducing

Go to the Stackblitz example and toggle font size on and off. Then go to index.astro turn on <Test client:load /> example.

Note - To break or fix hot-reloading you'll need to restart astro dev server. So if you start out with client:load and then remove client:load - hot reloading is going to keep on working until the next restart.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-odctde?file=src/components/Test.svelte

Participation

  • I am willing to submit a pull request for this issue.
@tony-sull tony-sull self-assigned this Apr 12, 2022
@tony-sull
Copy link
Contributor

Looks like this is the same underlying issue as #3097, I should have a PR out today that makes sure the browser reloads when a server-only component is updated in dev

@natemoo-re
Copy link
Member

This should be fixed in the most recent version! Please feel free to re-open if you're still having trouble with this.

@Kingkon963
Copy link

Hi, @natemoo-re
Unfortunately, I'm facing this issue in the latest version. At astro v1.9.1

image

The page reloads when I save the file but the latest change doesn't reflect on the browser until I restart the server again.

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

Successfully merging a pull request may close this issue.

4 participants