Skip to content

feat: print Dev Server URL on 'u' keypress to reduce terminal clutter #5489

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

HTGA75
Copy link

@HTGA75 HTGA75 commented May 7, 2025

  • This is a feature

For Bugs and Features; did you add new tests?

No new tests. This is a developer‑experience enhancement only.

Motivation / Use-Case

Sometimes the Dev Server URL scrolls out of view in busy terminals, making it hard to grab.
This change adds a new printUrlOnKeypress option (default false) that, when enabled, registers a keypress listener. Pressing u in the terminal will reprint the current Dev Server URL, reducing noisy automatic logs while still keeping the URL readily accessible.

Addresses discussion in #4907

Breaking Changes

None

Additional Info

  • The option is gated behind:
    devServer: {
      printUrlOnKeypress: true
    }

@HTGA75
Copy link
Author

HTGA75 commented May 13, 2025

👋 Hey @alexander-akait (or @webpack/collaborators), my branch is now up-to-date. Could someone please approve and run the CI workflows, and take a look at the changes? Thanks!

Copy link

codecov bot commented May 21, 2025

Codecov Report

Attention: Patch coverage is 15.38462% with 11 lines in your changes missing coverage. Please review.

Project coverage is 70.81%. Comparing base (af6bd68) to head (671a3dc).
Report is 132 commits behind head on master.

Files with missing lines Patch % Lines
lib/Server.js 15.38% 8 Missing and 3 partials ⚠️

❗ There is a different number of reports uploaded between BASE (af6bd68) and HEAD (671a3dc). Click for more details.

HEAD has 35 uploads less than BASE
Flag BASE (af6bd68) HEAD (671a3dc)
36 1
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #5489       +/-   ##
===========================================
- Coverage   90.29%   70.81%   -19.49%     
===========================================
  Files          15        5       -10     
  Lines        1577     1422      -155     
  Branches      601      557       -44     
===========================================
- Hits         1424     1007      -417     
- Misses        140      356      +216     
- Partials       13       59       +46     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant