Files
AIGC/demo/frontend/build-for-baota.bat

41 lines
1.0 KiB
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 前端打包脚本 - Windows
echo ========================================
echo.
echo [1/3] 安装依赖...
call npm install
if %errorlevel% neq 0 (
echo 错误: 依赖安装失败
pause
exit /b 1
)
echo.
echo [2/3] 构建生产版本...
call npm run build
if %errorlevel% neq 0 (
echo 错误: 构建失败
pause
exit /b 1
)
echo.
echo ========================================
echo 打包完成!
echo ========================================
echo.
echo 打包文件位置: frontend\dist\
echo.
echo 部署到宝塔步骤:
echo 1. 直接上传 frontend\dist 目录下的所有文件到服务器
echo 2. 上传到网站根目录(如:/www/wwwroot/your-domain
echo 3. 在宝塔面板配置 Nginx 为 Vue Router 模式
echo.
echo 提示:可以使用宝塔面板的文件管理器,选择 dist 目录下所有文件上传
echo 或使用 FTP/SFTP 工具上传整个 dist 目录的内容
echo.
pause