-
Notifications
You must be signed in to change notification settings - Fork 26.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(next): next build --debug
log output layout is broken
#63193
Conversation
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 |
@@ -824,9 +823,10 @@ export function printCustomRoutes({ | |||
}) | |||
.join('\n') | |||
|
|||
print(routesStr, '\n') | |||
print(`${routesStr}\n`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes and added tests look good, thanks for the PR!
Thank you for reviewing!! |
Why?
The output layout breaks when running
next build --debug
Current
Expected
✓ Generating static pages (4/4) Finalizing page optimization ... Collecting build traces ... Redirects ┌ source: /:path+/ ├ destination: /:path+ └ permanent: true
How?
Moved the
debug
output right above theroutes
output.Also, ensured that the output layout has a consistent number of line breaks (example below marked as
>
):Fixes #63192