juice-interface icon indicating copy to clipboard operation
juice-interface copied to clipboard

Improve NextJS dev experience

Open tomquirk opened this issue 1 year ago • 0 comments

Description

NextJS doesn't alert devs about type errors while the server is running (yarn dev). The only way to get it is by running yarn build.

This effectively means: if there's a bad import (or any other random typescript compile error), it won't be caught until the Vercel preview deployment fails in GitHub CI (as a result of Vercel running yarn build).

I wonder if there is a better wei.


Link from Jmill

"check-types": "tsc --noemit",
"lint": "npm run check-types && next lint",

adding these steps to the precommit hooks at least ensures it won't get pushed

https://github.com/vercel/next.js/discussions/31439#discussioncomment-1650116

tomquirk avatar Jul 21 '22 14:07 tomquirk