Start the project and automatically copy the terminal's network URL
English | 简体中文
npm install vite-plugin-cli-copy -D
pnpm add vite-plugin-cli-copy -D
- package.json
{
"scripts": {
"dev": "vite --host"
}
}
- vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import cliCopy from 'vite-plugin-cli-copy'
export default defineConfig({
plugins: [vue(), cliCopy()]
})
Great thanks to @bluwy The project of vite-plugin-qrcode