Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to script loader when strategy prop is undefined #65585

Merged
merged 7 commits into from
May 15, 2024
3 changes: 3 additions & 0 deletions packages/next/src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,9 @@ function handleDocumentScriptLoaderItems(
) {
scriptLoaderItems.push(child.props)
return
} else if (typeof child.props.strategy === 'undefined') {
scriptLoaderItems.push({ ...child.props, strategy: 'afterInteractive' })
return
}
}
})
Expand Down
Loading