next.js
a4c56f5d - log config evaluation time (#94811)

Commit
66 days ago
log config evaluation time (#94811) Log how long it takes to evaluate next.configs Sometimes it is very slow this can help users understand at least that it is due to their config Example dev log ``` running pnpm next --turbopack────────────────────────────────────────────────────────────────╯ ▲ Next.js 16.3.0-canary.52 (Turbopack) - Local: http://localhost:61086 - Network: http://10.103.12.203:61086 ✓ Ready in 272ms ✓ Running next.config.js took 13ms ``` Example build log ``` ✓ Running next.config.js took 10ms ▲ Next.js 16.3.0-canary.52 (Turbopack) - Experiments (use with caution): ✓ mdxRs ⚠ The "middleware" file convention is deprecated. Please use "proxy" instead. To migrate automatically, run: npx @next/codemod@canary middleware-to-proxy . Learn more: https://nextjs.org/docs/messages/middleware-to-proxy Creating an optimized production build ... ``` A few things to discuss * the bundler logging is incorrect in dev! If you use the `withRspack` plugin it will change the bundler to rspack but the next.js version string was already printed! * we eval config before printing the version in build but afterwards in dev so the evaluation timing line is a little surprising * this demonstrates that we do evaluate the config after 'Ready in' in dev, fine but maybe confusing for people?
Author
Parents
Loading