vite-plugin-dev-qrcode
v0.0.4
Published
vite plugin that displays QR codes for dev server URLs in terminal
Maintainers
Readme
vite-plugin-dev-qrcode
Displays a QR code in the terminal when the Vite development server starts, making it easy to access your app-in-development on mobile devices.
features
- Generates a QR code for the project URL in the terminal
- Supports multiple URLs (local and network addresses), but default ignore localhost url
- Customizable options
- Fully typed TypeScript implementation
install
# use npm
npm install vite-plugin-dev-qrcode -D
# use yarn
yarn add vite-plugin-dev-qrcode -D
# use pnpm
pnpm add vite-plugin-dev-qrcode -Dusage
import { defineConfig } from 'vite';
import devQRCode from 'vite-plugin-dev-qrcode';
export default defineConfig({
plugins: [devQRCode()]
});
options
| Option | Description | Default |
| ------- | ------------------------------------------ | ----------- |
| enabled | Whether to enable the plugin | true |
| verbose | Whether to show detailed logs | true |
| small | Whether to use a small-sized QR code image | true |
| filter | Decide to filter url by yourself | undefined |
develop
# project root directory run:
pnpm install
pnpm dev
pnpm -C examples dev