peixue-dev/Archive/[一次性]清除缓存重新编译-图片压缩后-2026-01-31.bat

40 lines
807 B
Batchfile
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
chcp 65001 >nul
echo ========================================
echo 清除缓存并重新编译小程序
echo ========================================
echo.
cd peidu\uniapp
echo 1. 删除 node_modules/.cache 目录...
if exist "node_modules\.cache" (
rmdir /s /q "node_modules\.cache"
echo ✓ 缓存已清除
) else (
echo 缓存目录不存在
)
echo.
echo 2. 删除 dist 目录...
if exist "dist" (
rmdir /s /q "dist"
echo ✓ dist 目录已删除
) else (
echo dist 目录不存在
)
echo.
echo 3. 重新编译小程序...
echo.
call npm run dev:mp-weixin
cd ..\..
echo.
echo ========================================
echo 编译完成!
echo 请在微信开发者工具中查看主包大小
echo ========================================
pause