Features
optimizeComponents({ hydration: false })drops Svelte 5's hydration code from an app that only mounts (1.7% smaller gzipped JS invite-matrix@svelte-5); the build fails if its output can still hydrate, such as SvelteKit with SSR or Astro islands (svelte-prune 0.13.0)
Performance
- upgrade svelte-prune to 0.13.0:
propAwareprunes by only the Carbon modules that can load (0.36 kB smaller prop-aware CSS in the Vite and SvelteKit matrices)
Use hydration: false only for an app that calls mount() and never hydrates server-rendered HTML; see Client-only apps. Webpack and Rspack ignore it with a warning.
| vite-matrix@svelte-5 | JS gzip |
|---|---|
full
| 101.27 kB |
full with hydration: false
| 99.51 kB |