Given a directory structure like the following:
📂projects
📂next <-- your Next.js checkout
📂demo-app
Here's how to build your local copy of Next.js. You'll want to do this every time you make a change to Next itself.
cd next
yarn prepublish
You can also try yarn dev
to set up automatic rebuilding when making changes (though I've had trouble with this).
cd demo-app
# to run a build:
(cd ../next && yarn run next build ../demo-app)
# to run start a production server:
(cd ../next && yarn run next start ../demo-app)
# to start the development server:
(cd ../next && yarn run next ../demo-app)