Files
Janicklas RalphandGitHub 0441f816a6 Changes to the beforeInteractive strategy to make it work for streaming (#31936)
Changes to the beforeInteractive strategy to make it work for streaming

Splitting `beforeInteractive` into two strategies `beforeInteractive` at the _document level and `beforePageRender` for page level <Scripts>
2022-04-21 21:15:53 +00:00

22 lines
413 B
JavaScript

import Script from 'next/script'
const Page = () => {
return (
<div class="container">
<div>page1</div>
</div>
)
}
Page.unstable_scriptLoader = () => {
return (
<Script
id="scriptBeforePageRender"
src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.20/lodash.min.js?a=scriptBeforePageRender"
strategy="beforePageRender"
></Script>
)
}
export default Page