From 8e7d72ce7143b1f8e8499ae6b1df8d9357a65ba6 Mon Sep 17 00:00:00 2001 From: sin <2943460818@qq.com> Date: Mon, 1 Apr 2019 17:29:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20basePath=20=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E4=B8=8D=E7=84=B6=E9=9D=9E=E6=A0=B9=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E6=83=85=E5=86=B5=EF=BC=8C=E6=97=A0=E6=B3=95=E8=AE=BF?= =?UTF-8?q?=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin-web/config/config.js | 2 +- admin-web/config/server/shell.sh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/admin-web/config/config.js b/admin-web/config/config.js index 0e63fb05c..95c640a50 100644 --- a/admin-web/config/config.js +++ b/admin-web/config/config.js @@ -65,7 +65,7 @@ if (APP_TYPE === 'site') { export default { // add for transfer to umi base: basePath, - // publicPath: basePath, + publicPath: basePath, plugins, define: { APP_TYPE: APP_TYPE || '', diff --git a/admin-web/config/server/shell.sh b/admin-web/config/server/shell.sh index 5dc3deca7..e7b278276 100644 --- a/admin-web/config/server/shell.sh +++ b/admin-web/config/server/shell.sh @@ -28,17 +28,19 @@ npm run build:admin-web cp -rf dist app/server # 复制文件到 project 目录执行 - if [ ! -d "/work2/project/admin-web/server/dist" ]; then + mkdir -pv /work2/project/admin-web/server/dist +else rm -rf /work2/project/admin-web/server/dist fi + cp -rf app/server /work2/project/admin-web # 安装 server 依赖项 cd /work2/project/admin-web/server -cnpm install +npm install # 启动服务 pm2 restart pm2.json