79231024

Date: 2024-11-27 16:10:48
Score: 1.5
Natty:
Report link

Can you set NODE_ENV in your package script? Next should respond to this (https://nextjs.org/docs/app/building-your-application/configuring/environment-variables#environment-variable-load-order).

run_prod: NODE_ENV=production next dev

Do be aware that you can't really get a production bundle out of next dev so you'd need to do next build && next start to really be sure everything works... but you'd at least get your faster dev cycle this way by avoiding the constant stop start of build && start.

Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Can you
  • Low reputation (1):
Posted by: Bee Thee Unbutterable