@echo off chcp 65001 echo ======================================== echo 清除编译缓存并重新编译 echo ======================================== cd /d "%~dp0\..\peidu\uniapp" echo. echo [1/4] 删除 dist 目录... if exist "dist" ( rmdir /s /q "dist" echo ✓ dist 目录已删除 ) else ( echo ✓ dist 目录不存在 ) echo. echo [2/4] 删除 node_modules/.vite 缓存... if exist "node_modules\.vite" ( rmdir /s /q "node_modules\.vite" echo ✓ .vite 缓存已删除 ) else ( echo ✓ .vite 缓存不存在 ) echo. echo [3/4] 删除 node_modules/.cache 缓存... if exist "node_modules\.cache" ( rmdir /s /q "node_modules\.cache" echo ✓ .cache 缓存已删除 ) else ( echo ✓ .cache 缓存不存在 ) echo. echo [4/4] 重新编译... call npm run dev:mp-weixin pause