-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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: make docusaurus serve automatically open in browser #7500
Conversation
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the deploy preview of this PR
|
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.
Works very well. Thanks!
This could technically be breaking, as I'm not sure what the behavior of this would be in the CI environment. However, we do warn users to not use serve
for actual deployment. I'll leave the choice to @slorber. The general direction is definitely desired: I've thought about the same.
See: https://www.scivision.dev/ci-detect-environment-variable/ Maybe the if statement should be changed from: if (cliOptions.open) { to: // This function lives in utils.ts or whatever
function inCI() {
return process.env["CI"].toLower() === "true";
} if (cliOptions.open && !inCI) { |
We already have |
Well the check should also be added to |
|
Still, it feels less error prone to deal with both at once. |
FWIW, I don't particularly like lightweight encapsulations—even less so when it's used to guard against a situation that never exists. |
👍 |
self-explanatory