Nx
Nx on GitHub
Course by Juri Strumpflohner

Automate Task Pipelines to Build Before next start

All Next.js projects usually come with these package.json scripts:

package.json
1{ 2 ... 3 "scripts": { 4 ... 5 "build": "next build", 6 "start": "next start" 7 } 8} 9

Running next start will only work if the .next folder is present in the project's root. This folder is created when running next build.

This is a very simple use case of a task pipeline, which defines dependencies among tasks.

In this lesson we're going to create a simple task pipeline such that whenever you run next start, Nx will automatically run next build (or restore it from the cache).

Monorepo World live replays available!

Watch the replays of exciting talks on developer tooling and monorepos! Catch all the insightful presentations from the event on our YouTube channel.