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

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