We’re going to be using the Nextjs CLI to scaffold the project we’re going to be working out of.
npx create-next-app
yarn create next-app
Once our project is created we’re going to setup some extra configs and defaults to help us organize our project and set ourselves up with some relative paths.
We can check out our project by running on of our commands from the package.json
npm run dev
If everything is successful we should see the pre built and styles landing page. While we’re at it, let’s setup our project to be a clean slate by removing some files and folder we won’t be using.
The pre-scaffolded landing page after spinning up a new Next app
We can get rid of:
/pages/api
since we’re not going to be utilizing API Routes in this project.next.config.js
contents since we’re not going to be worrying about strict
modestyles
since we’re going to be using Chakra UI for our styling..and lastly we can clean up our /pages/index
page to remove the boilerplate and newly broken imports of our styles.