This codemod updates Svelte component instantiation and event handling for Svelte 5:
- Converts new Component({ target }) to mount(Component, { target }).
- Replaces $destroy method calls with unmount.
- Ensures compatibility with Svelte 5's function-based components and new event handling.
Before
jsx
After
jsx