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