Skip to content
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

feat: show more info on server start #18721

Closed
wants to merge 4 commits into from

Conversation

nozomuikuta
Copy link
Contributor

@nozomuikuta nozomuikuta commented Nov 20, 2024

Description

Resolves #18719

  • Deprecate DevServer.printUrls and PreviewServer.printUrls.
  • Add DevServer.printInfo and PreviewServer.printInfo
  • Make the new methods print mode and loaded env file names on server start

I created this PR for v5 branch, but technically it can be applied to main branch too.

@@ -158,19 +159,31 @@ export function createLogger(
return logger
}

export function printServerUrls(
export function printServerInfo(
Copy link
Contributor Author

@nozomuikuta nozomuikuta Nov 20, 2024

Choose a reason for hiding this comment

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

The name printServerInfo might no longer represent what it does.
Do you come up with any good name?

@@ -158,19 +159,31 @@ export function createLogger(
return logger
}

export function printServerUrls(
export function printServerInfo(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMO, we don't have to have a dedicated shortcut to show loaded env files and it's fine to print them with other info on server start and on demand.

What do you think?

Copy link

Choose a reason for hiding this comment

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

we could also print them indeed, maybe a shortcut is overengineered

Comment on lines 281 to +284
/**
* Print server urls
* Print server info
*/
printUrls(): void
printInfo(): void
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I keep deprecated property in documentation?

@y-nk
Copy link

y-nk commented Nov 21, 2024

i'm grateful for this PR, i hope it lands soon. thanks a ton @nozomuikuta

@nozomuikuta
Copy link
Contributor Author

Vite 6 has been released, so let me close this PR and recreate one for it: #18808

@nozomuikuta nozomuikuta deleted the feat/print-more-info branch November 27, 2024 13:59
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.

2 participants