jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/379822 )
Change subject: Perf: Preload CSS too before scripts
......................................................................
Perf: Preload CSS too before scripts
The CSS was being loaded after the preload resources, so here we add it
to the preload resources too to load as soon as possible, before the
scripts, since styles block rendering.
Will explore making the script tags async in a future patch.
Change-Id: I98120c8193012f877d06972a94dbccfac5da5c6e
---
M src/server/components/html-page.tsx
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
Jhernandez: Looks good to me, approved
jenkins-bot: Verified
diff --git a/src/server/components/html-page.tsx
b/src/server/components/html-page.tsx
index 8d7f1be..86a4b2b 100644
--- a/src/server/components/html-page.tsx
+++ b/src/server/components/html-page.tsx
@@ -24,6 +24,8 @@
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{title ? `${title} - ` : ""}Marvin</title>
+ {/* Preload the stylesheet before the scripts */}
+ <link rel="preload" href={style(manifest)} {...{ as: "style" }} />
<link rel="stylesheet" href={style(manifest)} />
{assets.map(path => (
<link rel="preload" href={path} {...{ as: "script" }} />
--
To view, visit https://gerrit.wikimedia.org/r/379822
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I98120c8193012f877d06972a94dbccfac5da5c6e
Gerrit-PatchSet: 2
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Jhernandez <[email protected]>
Gerrit-Reviewer: Jhernandez <[email protected]>
Gerrit-Reviewer: Niedzielski <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits