添加 basePath 配置,不然非根目录情况,无法访问
parent
2e2ceaf38b
commit
8e7d72ce71
|
@ -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 || '',
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue