mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
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>
24 lines
597 B
JavaScript
24 lines
597 B
JavaScript
import Script from 'next/script'
|
|
|
|
import '../styles/styles.css'
|
|
|
|
function MyApp({ Component, pageProps }) {
|
|
return (
|
|
<>
|
|
<Script
|
|
id="documentAfterInteractive"
|
|
src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.20/lodash.min.js?a=documentAfterInteractive"
|
|
strategy="afterInteractive"
|
|
/>
|
|
<Script
|
|
id="documentLazyOnload"
|
|
src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.20/lodash.min.js?a=documentLazyOnload"
|
|
strategy="lazyOnload"
|
|
/>
|
|
<Component {...pageProps} />
|
|
</>
|
|
)
|
|
}
|
|
|
|
export default MyApp
|