mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-30 17:37:09 +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) => { %>
|
||||
<link rel="stylesheet" type="text/css" href="<%= baseUrl %><%= stylesheet %>" />
|
||||
<% }); %>
|
||||
<% scripts.forEach((script) => { %>
|
||||
<link rel="preload" href="<%= baseUrl %><%= script %>" as="script">
|
||||
<% }); %>
|
||||
</head>
|
||||
<body <%- bodyAttributes %>>
|
||||
<%- preBodyTags %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue