Replies: 1 comment 1 reply
-
What's preventing users from using this plugin? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Display a QR code for local network addresses, to make it easier for
developers to access their local build via a phone or tablet.
Background & Motivation
Sometimes you want to test your application on a mobile device, like phone or a tablet.
You already can do this by passing the
--host
flag to thedev
script.But typing
http://169.192.0.103
into your phone is not super easy to do. An easiersolution is to additionally display a QR code. The user can scan the code to access
the local development build.
Expo for React Native is already doing this.
You can also achieve the same result with
vite-plugin-qrcode
. The issuehere is that the plugin generates two QR codes because Astro returns two IP addresses.
From a UX/DX perspective it makes more sense to design it in a way where the text version
of the IP addresses and the QR code fit into one screen and the user does not need to scroll.
Goals
A concise, bulleted-list outlining the intended goals of this RFC.
Example
Start the development server, with the
--host
flag, to show a QR code:Beta Was this translation helpful? Give feedback.
All reactions