mirror of https://github.com/sveltejs/svelte
fix: correctly validate head snippets on the server (#15755)
* fix: correctly validate head snippets on the server * put the logic in copy_payload so it gets treeshaken in most cases --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>pull/15759/head
parent
3153384928
commit
fd0bc29973
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: correctly validate head snippets on the server
|
@ -0,0 +1,11 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
compileOptions: {
|
||||||
|
dev: true
|
||||||
|
},
|
||||||
|
mode: ['server'],
|
||||||
|
async test({ errors, assert }) {
|
||||||
|
assert.equal(errors, []);
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,7 @@
|
|||||||
|
{#snippet head()}
|
||||||
|
<title>Cool</title>
|
||||||
|
{/snippet}
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
{@render head()}
|
||||||
|
</svelte:head>
|
Loading…
Reference in new issue