From 2b60b6ac5043260d67cb60fa33a9566607a0ae4e Mon Sep 17 00:00:00 2001 From: Simon H <5968653+dummdidumm@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:02:05 +0200 Subject: [PATCH] move breaking change note --- .../routes/docs/content/03-appendix/02-breaking-changes.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md b/sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md index 894ed994a5..292b320913 100644 --- a/sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md +++ b/sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md @@ -93,7 +93,7 @@ import App from './App.svelte'; + const { html, head } = render(App, { props: { message: 'hello' } }); ``` -`render` also no longer returns CSS; it should be served separately from a CSS file. +In Svelte 4, rendering a component to a string also returned the CSS of all components. In Svelte 5, this is no longer the case by default because most of the time you're using a tooling chain that takes care of it in other ways (like SvelteKit). If you need CSS to be returned from `render`, you can set the `css` compiler option to `'injected'` and it will add `