1.1.2 • Published 1 year ago

@eventengineering/vite-qr-code v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Vite QR Code

This package is a vite plugin to show a QR code for any hosted vite bundle

Installation

npm install @eventengineering/vite-qr-code

Usage

import ViteQrCode from '@eventengineering/vite-qr-code';

export default defineConfig(() => ({
	...
	plugins: [
		...
		ViteQrCode(),
	],
});

Settings

A settings object can be passed into the function. This can contain:

  • addressFamilies (String, truthy value, or array of stirng or TRUE - defaults to "IPv4", "IPv6", TRUE implies any family of IP address)
  • networks (Array of object - defaults to all found networks, each object must contain address and family)
  • protocols (Array of string - defaults to "http")

Caveats

In testing, the full addresses couldn't be pulled from the vite server, though I'm not sure why. As such, use of the networkInterfaces function on the OS, and filtering out the loopback interface has been used

HTTPS would be preferable to have the full stack in a browser, however it is unlikely you have it configured for a development IP. By all means, change the protocols if you need.

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago