zhibo/clear_frontend_cache.bat
2026-01-03 19:22:42 +08:00

39 lines
772 B
Batchfile
Raw 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
echo ========================================
echo 清除前端缓存并重新构建
echo ========================================
cd Zhibo\admin
echo.
echo [1/4] 删除 node_modules/.cache 目录...
if exist node_modules\.cache (
rmdir /s /q node_modules\.cache
echo 缓存目录已删除
) else (
echo 缓存目录不存在,跳过
)
echo.
echo [2/4] 删除 dist 目录...
if exist dist (
rmdir /s /q dist
echo dist目录已删除
) else (
echo dist目录不存在跳过
)
echo.
echo [3/4] 重新构建生产环境...
call npm run build:prod
echo.
echo [4/4] 完成!
echo.
echo 请执行以下操作:
echo 1. 清除浏览器缓存 (Ctrl+Shift+Delete)
echo 2. 重新登录后台
echo 3. 测试直播管理菜单
echo.
pause