diff --git a/uniapp/scripts/release.mjs b/uniapp/scripts/release.mjs index 38b61a3..ec2cce6 100644 --- a/uniapp/scripts/release.mjs +++ b/uniapp/scripts/release.mjs @@ -2,8 +2,8 @@ import path from 'path' import fsExtra from 'fs-extra' const { existsSync, remove, copy } = fsExtra const cwd = process.cwd() -//打包发布路径,谨慎改动 -const releaseRelativePath = '../server/public/mobile' +// 打包发布路径,谨慎改动;服务端构建时可用 UNIAPP_RELEASE_PATH 覆盖。 +const releaseRelativePath = process.env.UNIAPP_RELEASE_PATH || '../server/public/mobile' const distPath = path.resolve(cwd, 'dist/build/h5') const releasePath = path.resolve(cwd, releaseRelativePath)