hmr 在项目文件修改后,不会重新热加载,每次都要手动重新,npm run dev,求大神看看
nodejs:v14.15.4 npm:6.14.15
包文件.json
{ "name": "testvue", "private": true, "version": "0.0.0", "scripts": { "dev": "vite", "build": "vue-tsc --noEmit && vite build", "preview": "vite preview" }, "dependencies": { "vue": "^3.2.25" }, "devDependencies": { "@vitejs/plugin-vue": "^2.2.0", "typescript": "^4.5.4", "vite": "^2.8.0", "vue-tsc": "^0.29.8" } }
活力
系统信息npx envinfo --system --npmPackages '{vite,@vitejs/*}' --binaries --browsers
npx: 1 安装成功,用时 1.575 秒
System:
OS: macOS 11.6.2
CPU: (4) x64 Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
Memory: 879.65 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.15.4 - /usr/local/bin/node
Yarn: 1.22.11 - /usr/local/bin/yarn
npm: 6.14.15 - /usr/local/bin/npm
Browsers:
Chrome: 94.0.4606.61
Safari: 15.2
npmPackages:
@vitejs/plugin-vue: ^2.2.0 => 2.2.4
vite: ^2.8.0 => 2.8.6
使用包管理器
npm