Skip to content

Commit 1e3517d

Browse files
authored
Merge pull request #2 from buhrmi/master
include component CSS in head, fixes inertiajs#1760
2 parents 98168e7 + 68fa8f6 commit 1e3517d

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
@@ -50,11 +50,14 @@ export default async function createInertiaApp({ id = 'app', resolve, setup, pro
5050
}
5151

5252
if (isServer) {
53-
const { html, head } = SSR.render({ id, initialPage })
53+
const { html, head, css } = SSR.render({ id, initialPage })
5454

5555
return {
5656
body: html,
57-
head: [head],
57+
head: [
58+
head,
59+
`<style data-vite-css>${css.code}</style>`,
60+
],
5861
}
5962
}
6063
}

0 commit comments

Comments
 (0)