Closed
Description
Describe the bug
When using HMR (i.e. vite
in development mode), the first instance of any particular svelte-retag
loaded component loses state after the first save. This is likely due to an issue with the props proxy which was setup for lit style lowercase props here: https://github.com/patricknelson/svelte-retag/blob/1.3.1/index.js#L430
Likely a regression from #18.
Reproduction
- Setup a component that takes a prop (such as
link="https://example.com"
) calledExampleComponent.svelte
and ensurelink
prop is used somehow in the component - Define a custom element for it in svelte retag (e.g.
example-element
) - Setup page with
<example-element link="https://example.com">
- Start up
yarn vite
to start up dev mode and load page setup in step above - Edit
ExampleComponent.svelte
Bug appears when link
is now empty.
Logs
No response
System Info
System:
OS: Linux 5.15 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
CPU: (16) x64 Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz
Memory: 3.19 GB / 5.79 GB
Container: Yes
Shell: 5.1.4 - /bin/bash
Binaries:
Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v16.14.2/bin/yarn
npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
Browsers:
Chrome: 119.0.6045.105
npmPackages:
svelte: ^4.2.2 => 4.2.2
svelte-retag: 1.3.0 => 1.3.0
Severity
annoyance