Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include styles for dynamically imported components (#5138)
* add failing test for #5137 * partial fix for #5137 * defer gathering of styles * fix typechecking * try and nudge turbo into not breaking everything * include dynamically imported styles during dev SSR * changeset * rename some stuff to make it clearer * simplify, and dont follow dynamic imports from entry * tidy up * tidy up * tidy up
- Loading branch information
1 parent
d63bd72
commit 4842a24
Showing
13 changed files
with
165 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
Include dynamically imported styles during SSR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/kit/test/apps/basics/src/routes/load/dynamic-import-styles/_/Thing.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<p id="thing">this text is red</p> | ||
|
||
<style> | ||
p { | ||
color: red; | ||
} | ||
</style> |
15 changes: 15 additions & 0 deletions
15
packages/kit/test/apps/basics/src/routes/load/dynamic-import-styles/index.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script context="module"> | ||
export async function load() { | ||
return { | ||
props: { | ||
Thing: (await import('./_/Thing.svelte')).default | ||
} | ||
}; | ||
} | ||
</script> | ||
|
||
<script> | ||
export let Thing; | ||
</script> | ||
|
||
<Thing /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.