diff --git a/package-lock.json b/package-lock.json index 70ea41e..43f1c8e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,6 +47,7 @@ "typescript": "^5.x", "vite": "^5.x", "vite-bundle-visualizer": "^0.x", + "vite-plugin-qrcode": "^0.2.3", "vitest": "^0.x", "web-vitals": "^3.x" }, @@ -7998,6 +7999,15 @@ "node": ">=6" } }, + "node_modules/qrcode-terminal": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz", + "integrity": "sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ==", + "dev": true, + "bin": { + "qrcode-terminal": "bin/qrcode-terminal.js" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -10002,6 +10012,21 @@ "url": "https://opencollective.com/vitest" } }, + "node_modules/vite-plugin-qrcode": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/vite-plugin-qrcode/-/vite-plugin-qrcode-0.2.3.tgz", + "integrity": "sha512-TFzhf20v29hnh2XEoZ2kxg8Ff/ui36pR7PGDaHaKEmsQaRagv31XacHxbw5O07HcC1Mkr4tKcYb+PFASSceHmw==", + "dev": true, + "dependencies": { + "qrcode-terminal": "^0.12.0" + }, + "engines": { + "node": "^14.13.1 || ^16.0.0 || >=18" + }, + "peerDependencies": { + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0" + } + }, "node_modules/vitest": { "version": "0.34.6", "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.34.6.tgz", diff --git a/package.json b/package.json index 43cfd23..a4ce719 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "repository": "github:eruptionjs/core.git", "bugs": "https://github.com/eruptionjs/core/issues", "scripts": { - "dev": "vite", + "dev": "vite --host", "start": "vite", "build": "npm run lint-staged && tsc && vite build", "preview": "vite preview", @@ -75,6 +75,7 @@ "typescript": "^5.x", "vite": "^5.x", "vite-bundle-visualizer": "^0.x", + "vite-plugin-qrcode": "^0.2.3", "vitest": "^0.x", "web-vitals": "^3.x" }, @@ -102,4 +103,4 @@ "starter", "template" ] -} +} \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 945b966..2cf1584 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,6 +2,7 @@ import react from '@vitejs/plugin-react-swc' import { resolve } from 'path' import { defineConfig } from 'vite' +import { qrcode } from 'vite-plugin-qrcode' // https://vitejs.dev/config/ export default defineConfig({ @@ -11,7 +12,7 @@ export default defineConfig({ }, }, envDir: './env/', - plugins: [react()], + plugins: [react(), qrcode()], server: { watch: { usePolling: true,