-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
always include
<link rel="stylesheet">
even if excluded from Link h…
- Loading branch information
1 parent
3124296
commit fbe4fe7
Showing
3 changed files
with
23 additions
and
10 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 | ||
--- | ||
|
||
fix: always include `<link rel="stylesheet">`, even for stylesheets excluded from Link headers |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** @type {import('@sveltejs/kit').Handle} */ | ||
export function handle({ event, resolve }) { | ||
return resolve(event, { | ||
// this allows us to check that <link rel="stylesheet"> is still added | ||
// to the DOM even if they're not included by `preload` | ||
preload: ({ type }) => type !== 'css' | ||
}); | ||
} |