Unverified Commit 19adc81e authored by Sam Ko's avatar Sam Ko Committed by GitHub

docs: update API reference for <Script> (switch to `_document.js`) (#61875)

## Changes

- Fixes https://github.com/vercel/next.js/issues/61594

Closes NEXT-2421
parent 8f6f1379
...@@ -78,7 +78,7 @@ Scripts denoted with this strategy are preloaded and fetched before any first-pa ...@@ -78,7 +78,7 @@ Scripts denoted with this strategy are preloaded and fetched before any first-pa
<PagesOnly> <PagesOnly>
`beforeInteractive` scripts must be placed inside the `App` Component (`pages/_app.js`) and are designed to load scripts that are needed by the entire site (i.e. the script will load when any page in the application has been loaded server-side). `beforeInteractive` scripts must be placed inside the `Document` Component (`pages/_document.js`) and are designed to load scripts that are needed by the entire site (i.e. the script will load when any page in the application has been loaded server-side).
</PagesOnly> </PagesOnly>
...@@ -126,7 +126,7 @@ export default function RootLayout({ children }) { ...@@ -126,7 +126,7 @@ export default function RootLayout({ children }) {
<PagesOnly> <PagesOnly>
```jsx filename="pages/_app.js" ```jsx filename="pages/_document.js"
import { Html, Head, Main, NextScript } from 'next/document' import { Html, Head, Main, NextScript } from 'next/document'
import Script from 'next/script' import Script from 'next/script'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment