Skip to content

Commit 68fa8f6

Browse files
committed
include component CSS in head, fixed inertiajs#1760
1 parent 0fc4b1c commit 68fa8f6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/svelte/src/createInertiaApp.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,14 @@ export default async function createInertiaApp({ id = 'app', resolve, setup, pro
4444
}
4545

4646
if (isServer) {
47-
const { html, head } = SSR.render({ id, initialPage })
47+
const { html, head, css } = SSR.render({ id, initialPage })
4848

4949
return {
5050
body: html,
51-
head: [head],
51+
head: [
52+
head,
53+
`<style data-vite-css>${css.code}</style>`,
54+
],
5255
}
5356
}
5457
}

0 commit comments

Comments
 (0)