pull/12370/head
Rich Harris 2 years ago
parent 544b2e17ee
commit e2fc6801a8

@ -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
}
}
};
```

@ -5,7 +5,7 @@ export default {
compilerOptions: {
compatibility: {
// site-kit manually instantiates components inside an action
legacyComponent: true
componentApi: 4
}
},
kit: {

Loading…
Cancel
Save