Next.js: Disallow importing `next/document` outside of pages/_document.js

Created on 3 Jun 2020  路  1Comment  路  Source: vercel/next.js

Feature request

Is your feature request related to a problem? Please describe.

Currently next/document can be imported anywhere even though it should only be used in pages/_document.js and causes issues when imported elsewhere.

Describe the solution you'd like

  • Disallow importing next/document outside of pages/_document.js
good first issue story feature request

Most helpful comment

Hi @timneutkens , I'm on it 馃憢

>All comments

Hi @timneutkens , I'm on it 馃憢

Was this page helpful?
0 / 5 - 0 ratings

Related issues

havefive picture havefive  路  3Comments

pie6k picture pie6k  路  3Comments

sospedra picture sospedra  路  3Comments

irrigator picture irrigator  路  3Comments

jesselee34 picture jesselee34  路  3Comments