You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Neither of the above are pages —they are special components. Since everyone adopts the convention of having a components folder alongside pages, it would be a lot nicer and "more correct" IMO to move them here and document that these are reserved component names that are used by Next.
I think this is both neater and will simplify your code splitting and bundling logic, since you can read all JS files in pages and not have to filter out these special cases. It would also eradicate the slightly ugly underscore named file...that's just my opinion though!
The text was updated successfully, but these errors were encountered:
With 2.0.0 being released soon, I thought it might be a good opportunity to introduce a breaking change like this. Could you not provide support for both options and log a warning to those using pages/_document.js and pages/_error.js, advising them to move and rename their files? That way it wouldn't break anything but would allow people to migrate.
pages/_document.js > components/Document.js
pages/_error.js > components/Error.js
Neither of the above are pages —they are special components. Since everyone adopts the convention of having a
components
folder alongsidepages
, it would be a lot nicer and "more correct" IMO to move them here and document that these are reserved component names that are used by Next.I think this is both neater and will simplify your code splitting and bundling logic, since you can read all JS files in
pages
and not have to filter out these special cases. It would also eradicate the slightly ugly underscore named file...that's just my opinion though!The text was updated successfully, but these errors were encountered: