forumone / nextjs-project

Next.js project template
0 stars 0 forks source link

Remnants of `pages` directory need cleanup #87

Closed mdrayer closed 3 months ago

mdrayer commented 4 months ago

With the switch to using the Nextjs App Router, there are still a couple places where pages directory setup is still assumed. We'll need to clean these up to swap fully to app router.

  1. I get the following error when I run the nextjs app, :

    Warning: You're using next/head inside the app directory, please migrate to the Metadata API. See https://nextjs.org/docs/app/building-your-application/upgrading/app-router-migration#step-3-migrating-nexthead for more details.

The culprits seems to be source/04-templates/LandingPage/LandingPage.tsx and source/04-templates/Page/Page.tsx.

  1. Prettier scripts still refer to pages instead of app: https://github.com/forumone/nextjs-project/blob/1.x/package.json#L12-L13
  2. The eslint.dirs config in next.config.js still refers to pages: https://github.com/forumone/nextjs-project/blob/1.x/next.config.js#L9
  3. Documentation in the README files could use updating to refer to App Router docs.