noDocumentImportInPage
Ce contenu n’est pas encore disponible dans votre langue.
Diagnostic Category: lint/nursery/noDocumentImportInPage
Since: v1.9.4
Sources:
- Same as:
@next/no-document-import-in-page
Prevents importing next/document
outside of pages/_document.jsx
in Next.js projects.
The next/document
module is intended for customizing the document structure globally in Next.js.
Importing it outside of pages/_document.js
can cause unexpected behavior and break certain features of the framework.