mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
fix(svelte): update import statements and bump peer dependency for v5 (#10645)
This commit is contained in:
parent
f7d6254f8f
commit
51112ab3f1
4 changed files with 8 additions and 3 deletions
5
.changeset/calm-spiders-listen.md
Normal file
5
.changeset/calm-spiders-listen.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
"@astrojs/svelte": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Bumps Svelte 5 peer dependency to `^5.0.0-next.90` and support its latest breaking changes
|
|
@ -1,5 +1,5 @@
|
||||||
import { hydrate, mount, unmount } from 'svelte';
|
import { hydrate, mount, unmount } from 'svelte';
|
||||||
import { add_snippet_symbol } from 'svelte/internal';
|
import { add_snippet_symbol } from 'svelte/internal/client';
|
||||||
|
|
||||||
// Allow a slot to be rendered as a snippet (dev validation only)
|
// Allow a slot to be rendered as a snippet (dev validation only)
|
||||||
const tagSlotAsSnippet = import.meta.env.DEV ? add_snippet_symbol : (s) => s;
|
const tagSlotAsSnippet = import.meta.env.DEV ? add_snippet_symbol : (s) => s;
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"astro": "^4.0.0",
|
"astro": "^4.0.0",
|
||||||
"svelte": "^4.0.0 || ^5.0.0-next.56",
|
"svelte": "^4.0.0 || ^5.0.0-next.90",
|
||||||
"typescript": "^5.3.3"
|
"typescript": "^5.3.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { add_snippet_symbol } from 'svelte/internal';
|
import { add_snippet_symbol } from 'svelte/internal/server';
|
||||||
import { render } from 'svelte/server';
|
import { render } from 'svelte/server';
|
||||||
|
|
||||||
// Allow a slot to be rendered as a snippet (dev validation only)
|
// Allow a slot to be rendered as a snippet (dev validation only)
|
||||||
|
|
Loading…
Reference in a new issue