mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-05 20:32:42 +02:00
feat(v2): preload first page load script asap (#2208)
Co-authored-by: Endi <endiliey@gmail.com>
This commit is contained in:
parent
a38125a718
commit
5e821fd4e0
1 changed files with 3 additions and 0 deletions
|
@ -19,6 +19,9 @@ module.exports = `
|
||||||
<% stylesheets.forEach((stylesheet) => { %>
|
<% stylesheets.forEach((stylesheet) => { %>
|
||||||
<link rel="stylesheet" type="text/css" href="<%= baseUrl %><%= stylesheet %>" />
|
<link rel="stylesheet" type="text/css" href="<%= baseUrl %><%= stylesheet %>" />
|
||||||
<% }); %>
|
<% }); %>
|
||||||
|
<% scripts.forEach((script) => { %>
|
||||||
|
<link rel="preload" href="<%= baseUrl %><%= script %>" as="script">
|
||||||
|
<% }); %>
|
||||||
</head>
|
</head>
|
||||||
<body <%- bodyAttributes %>>
|
<body <%- bodyAttributes %>>
|
||||||
<%- preBodyTags %>
|
<%- preBodyTags %>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue