svelte-effect-runtime
Reference

Preprocess

Reference for lower-level transform and preprocess usage.

The Svelte preprocessor is required for Effect component syntax. It removes the effect attribute before Svelte parses the file, lowers top-level script yield*, and rewrites markup yield* into runtime helper calls.

Example

import { preprocess } from "svelte-effect-runtime";

export default {
  preprocess: [preprocess()],
};

Notes

  • Use this alongside the Vite plugin, not instead of it.
  • The root entry exports preprocess() for app setup.
  • The svelte-effect-runtime/runtime/preprocess entry also exports lower-level transform functions for tooling and tests.

On this page