Skip to content

Instantly share code, notes, and snippets.

@pedropalhari
Created July 2, 2021 09:56
Show Gist options
  • Save pedropalhari/6e074619bd5fe591eb8fd81517efc8bb to your computer and use it in GitHub Desktop.
Save pedropalhari/6e074619bd5fe591eb8fd81517efc8bb to your computer and use it in GitHub Desktop.
Two commands that MUST be there on every Next.js project I do
{
"dev": "concurrently -c green.bold,blue.bold -n NEXT,TSC \"npm run dev-next\" \"npm run dev-tsc\"",
"dev-next": "next dev",
"dev-tsc": "tsc --noEmit --watch --preserveWatchOutput",
"build": "rimraf ./.next && next build && next export"
}
@pedropalhari
Copy link
Author

The first command is to concurrently check for types using typescript across the whole project and the build one is for when exporting static so your bundle does not become 60MB+ by accident.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment