Add an optional devQR configuration to display a QR code for the development server (local or network) #86059
jay-herrera
started this conversation in
Ideas
Replies: 1 comment
-
|
Hello! This aligns perfectly with the proposal, and I'd be happy to volunteer to help with this task as well if you're interested. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
2.Reduce boilerplate: eliminate custom shell scripts that manually compute IP addresses, find ports, and generate QR codes.
Non-Goals
Background
Today, developers may create shell scripts that:
This is common across teams building responsive or mobile-first web apps.
It’s especially useful when testing PWAs, service workers, push notifications, or local HTTPS flows from physical devices.
However, this functionality is external to Next.js — every developer reinvents it.
By baking this into next dev, Next.js can offer a polished and consistent developer experience similar to frameworks like Expo or Vite (with plugins), which already display QR codes for local previews.
Proposal
Add an optional field in next.config.js:
Default: undefined → no QR code displayed.
Options:
'local' → QR code for https://localhost:
'network' → QR code for the LAN IP (e.g., https://10.0.0.207:)
Behaviour
When running next dev, the output could look like this:
#Implementation Notes
#Benefits
✅ Faster mobile testing workflow
✅ No more custom scripts or npm dependencies
✅ Minimal terminal clutter
✅ Works across platforms (macOS, Windows, Linux)
✅ Aligns with Next.js’s goal of world-class DX
#Are you interested in contributing?
Yes — I would be happy to contribute the implementation and documentation for this feature following the team’s guidance.
Beta Was this translation helpful? Give feedback.
All reactions