fix(next): next build --debug log output layout is broken#63193
fix(next): next build --debug log output layout is broken#63193ijjk merged 6 commits intovercel:canaryfrom
next build --debug log output layout is broken#63193Conversation
|
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
| .join('\n') | ||
|
|
||
| print(routesStr, '\n') | ||
| print(`${routesStr}\n`) |
There was a problem hiding this comment.
Note that print is just a console.log.
It was adding a single space after routeStr, think of console.log('a', 'b').
Why modify it? For better output string match.
| print(`${routesStr}\n`) | ||
| } | ||
|
|
||
| print() |
There was a problem hiding this comment.
Ensure two line breaks (marked as > below) for each option:
Headers
┌ source: /
└ headers:
└ x-custom-headers: headers
>
>
Rewrites
┌ source: /rewrites
└ destination: /There was a problem hiding this comment.
@huozhi, sorry to ping you, but wanted to ask you whether two line breaks are OK since I believe you have good aesthetics.
| output = stripAnsi(next.cliOutput) | ||
| }) | ||
| describe('production - app dir - build output', () => { | ||
| const { next } = nextTestSetup({ |
There was a problem hiding this comment.
Refactored previous build output test to use nextTestSetup
--debug was unorganizednext build --debug log output layout is broken
Stats from current PRDefault BuildGeneral
Client Bundles (main, webpack)
Legacy Client Bundles (polyfills)
Client Pages
Client Build Manifests
Rendered Page Sizes
Edge SSR bundle Size
Middleware size
Next Runtimes
build cache
Diff detailsDiff for middleware.jsDiff too large to display |
ijjk
left a comment
There was a problem hiding this comment.
Changes and added tests look good, thanks for the PR!
|
Thank you for reviewing!! |
Why?
The output layout breaks when running
next build --debugCurrent
Expected
✓ Generating static pages (4/4) Finalizing page optimization ... Collecting build traces ... Redirects ┌ source: /:path+/ ├ destination: /:path+ └ permanent: trueHow?
Moved the
debugoutput right above theroutesoutput.Also, ensured that the output layout has a consistent number of line breaks (example below marked as
>):Fixes #63192