3

svelte/5/server-api-changes

How to Use
Run this codemod on your codebase using one of the following commands

The easiest way to run this codemod without installing anything globally:

Documentation

This codemod updates Svelte component rendering:

  • Converts calls to Component.render({...}) to render(Component, { props }).
  • Ensures the import statement import { render } from 'svelte/server' is added if render is used.

Before

jsx

After

jsx

Ready to contribute?

Build your own codemod and share it with the community.