From 56d740ae190ee25698cf7fd0b59099b3ed13bace Mon Sep 17 00:00:00 2001 From: smallchill Date: Wed, 12 Apr 2023 23:05:34 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E6=B7=BB=E5=8A=A0prod=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E7=9A=84=E5=90=AF=E5=8A=A8=E4=B8=8E=E6=89=93=E5=8C=85?= =?UTF-8?q?=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 2 +- package.json | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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": {