-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Exported functions become "stale" on hot reload #43
Comments
Duplicate of sveltejs/vite-plugin-svelte#134 |
@bluwy are you sure it's the same? Mine has nothing to do with context module. |
Ah I think you're right. I can reproduce this too at https://stackblitz.com/edit/vitejs-vite-rdqnfu?file=src%2FInner.svelte&terminal=dev. Transferring this over to vite-plugin-svelte as HMR is not related to Svelte. But this issue could be related to svelte-hmr too. Repro steps with stackblitz:
|
i suppose this is one for svelte-hmr. cc @rixo |
Yes, I confirm this is independent from the Should we transfer the issue to |
I don't have permissions to transfer over to svelte-hmr, unless someone does 👀 Else I'm fine recreating an issue there too. |
Describe the bug
When a component exposes a function with
export const doStuff = () => { /* code */ }
so that an outer component can invoke it, the code inside the exported function doesn't have access to the local variables anymore after reload.Reproduction
https://svelte.dev/repl/5d2a100498f34c50ad9ce2ff2a4e3569?version=3.46.4
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: