From e2fc6801a85e0f03e9939f793362748b68a5c6f1 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 9 Jul 2024 14:52:00 -0400 Subject: [PATCH] tidy up --- .../routes/docs/content/03-appendix/02-breaking-changes.md | 6 ++++-- sites/svelte-5-preview/svelte.config.js | 2 +- 2 files changed, 5 insertions(+), 3 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 189d982772..8e7715f209 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 @@ -70,13 +70,15 @@ import App from './App.svelte' export default app; ``` -If this component is not under your control, you can use the `compatibility.legacyComponent` compiler option for auto-applied backwards compatibility, which means code using `new Component(...)` keeps working without adjustments (note that this adds a bit of overhead to each component). This will also add `$set` and `$on` methods for all component instances you get through `bind:this`. +If this component is not under your control, you can use the `compatibility.componentApi` compiler option for auto-applied backwards compatibility, which means code using `new Component(...)` keeps working without adjustments (note that this adds a bit of overhead to each component). This will also add `$set` and `$on` methods for all component instances you get through `bind:this`. ```js /// svelte.config.js export default { compilerOptions: { - compatibility: { legacyComponent: true } + compatibility: { + componentApi: 4 + } } }; ``` diff --git a/sites/svelte-5-preview/svelte.config.js b/sites/svelte-5-preview/svelte.config.js index 77cb526bed..d2d2d8019d 100644 --- a/sites/svelte-5-preview/svelte.config.js +++ b/sites/svelte-5-preview/svelte.config.js @@ -5,7 +5,7 @@ export default { compilerOptions: { compatibility: { // site-kit manually instantiates components inside an action - legacyComponent: true + componentApi: 4 } }, kit: {