Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 21, 2025

example

image
  • Understand the current build flow and logging in plugin-rsc
  • Add descriptive logging for each build phase in the buildApp function
  • Test the changes with example builds to verify improved clarity
  • Ensure the logging is consistent and informative
  • Run linter and tests to verify no breaking changes
  • Update terminology: "analyze dependencies" → "analyze server references"
  • Update terminology: "build xxx" → "build xxx environment"

Changes Made

Enhanced build logging in @vitejs/plugin-rsc by adding simple info messages before each build step with improved terminology.

Result

Standard build (with SSR):

[1/5] analyze client references...
vite v7.1.10 building SSR bundle for production...
[2/5] analyze server references...
vite v7.1.10 building SSR bundle for production...
[3/5] build rsc environment...
vite v7.1.10 building SSR bundle for production...
[4/5] build client environment...
vite v7.1.10 building for production...
[5/5] build ssr environment...
vite v7.1.10 building SSR bundle for production...

No-SSR build:

[1/4] analyze client references...
vite v7.1.10 building SSR bundle for production...
[2/4] analyze server references...
vite v7.1.10 building for production...
[3/4] build rsc environment...
vite v7.1.10 building SSR bundle for production...
[4/4] build client environment...
vite v7.1.10 building for production...

The changes use simple logger.info() calls before each build to provide clear progress indicators with step numbers and accurate descriptions.

Original prompt

This section details on the original issue you should resolve

<issue_title>Improve build phase logging</issue_title>
<issue_description>- related wakujs/waku#1726 (comment)

Can we improve Vite logger to make it clear about what each step of these 5 builds do?

vite v7.1.5 building SSR bundle for production...
✓ 1280 modules transformed.
✓ built in 3.22s
vite v7.1.5 building SSR bundle for production...
✓ 4331 modules transformed.
✓ built in 10.01s
vite v7.1.5 building SSR bundle for production...
✓ 1280 modules transformed.
...(dist/server/assets/...)
✓ built in 9.08s
vite v7.1.5 building for production...
..(dist/public/assets/...)
✓ built in 9.29s
vite v7.1.5 building SSR bundle for production...
...(dist/server/ssr/assets/...)
```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>

Fixes #925


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Improve Vite build phase logging clarity feat(plugin-rsc): Improve build phase logging to clarify each build step Oct 21, 2025
Copilot AI requested a review from hi-ogawa October 21, 2025 12:43
Copilot finished work on behalf of hi-ogawa October 21, 2025 12:43
Copy link
Contributor

@hi-ogawa hi-ogawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot let's not patch logger. let's start with just log something before each build.

Copy link
Contributor Author

Copilot AI commented Oct 22, 2025

@copilot let's not patch logger. let's start with just log something before each build.

Updated to use simple logger.info() calls before each build instead of patching the logger. Commit: 87c4ea4

Build output now shows:

[1/5] analyze client references...
vite v7.1.10 building SSR bundle for production...
[2/5] analyze dependencies...
vite v7.1.10 building SSR bundle for production...
[3/5] build rsc...
vite v7.1.10 building SSR bundle for production...
[4/5] build client...
vite v7.1.10 building for production...
[5/5] build ssr...
vite v7.1.10 building SSR bundle for production...

Copilot AI requested a review from hi-ogawa October 22, 2025 11:14
Copilot finished work on behalf of hi-ogawa October 22, 2025 11:14
Copy link
Contributor

@hi-ogawa hi-ogawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot "analyze dependencies..." should be "analyze server references...".

"build xxx" should be "build xxx environment"

Copy link
Contributor Author

Copilot AI commented Oct 22, 2025

@copilot "analyze dependencies..." should be "analyze server references...".

"build xxx" should be "build xxx environment"

Updated the terminology. Commit: 0d31c9f

Changes:

  • "analyze dependencies..." → "analyze server references..."
  • "build xxx" → "build xxx environment"

Output now shows:

[1/5] analyze client references...
[2/5] analyze server references...
[3/5] build rsc environment...
[4/5] build client environment...
[5/5] build ssr environment...

Copilot AI requested a review from hi-ogawa October 22, 2025 11:21
Copilot finished work on behalf of hi-ogawa October 22, 2025 11:21
@hi-ogawa hi-ogawa marked this pull request as ready for review October 22, 2025 11:27
@hi-ogawa hi-ogawa changed the title feat(plugin-rsc): Improve build phase logging to clarify each build step feat(rsc): show logs for build steps Oct 23, 2025
@hi-ogawa hi-ogawa merged commit 170f74e into main Oct 23, 2025
20 of 22 checks passed
@hi-ogawa hi-ogawa deleted the copilot/improve-build-logging branch October 23, 2025 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve build phase logging

2 participants