diff --git a/build.sh b/build.sh index 3f96fcd8..74b413ae 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,7 @@ #!/bin/bash echo "====================打包文件====================" -yarn build +yarn build:prod echo "====================传输文件====================" scp -P 22 -r ./dist/** root@192.168.0.188:/docker/nginx/web/html diff --git a/package.json b/package.json index 1413614d..a00e8a3e 100755 --- a/package.json +++ b/package.json @@ -3,7 +3,9 @@ "version": "3.1.0", "scripts": { "dev": "vite --host", + "prod": "vite --mode production", "build": "vite build", + "build:prod": "vite build --mode production", "serve": "vite preview --host" }, "dependencies": {