@taole/deploy-helper 0.6.5 → 0.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -152,7 +152,7 @@ export function checkOfflinePkg(config) {
152
152
  }
153
153
  const packageJson = getJsonConfig(config.workDir, "package.json");
154
154
  const userDeployHelperConfig = getUserDeployHelperConfig();
155
- const distPath = join(config.workDir, offlineConfig.distDir);
155
+ const distPath = join(config.workDir, offlineConfig && offlineConfig.distDir ? offlineConfig.distDir : "dist");
156
156
 
157
157
  // 如果offlineConfig.remove为true,则不构建离线包
158
158
  const willRemovePkg = offlineConfig && offlineConfig.name && offlineConfig.remove === true && offlineConfig.skip !== true;
@@ -221,6 +221,7 @@ export function checkOfflinePkg(config) {
221
221
  }
222
222
  }
223
223
  const hookPostBuild = async () => {
224
+ if(!offlineConfig || !config) return;
224
225
  // 在构建完成后,执行一些操作
225
226
  fixEntryHtml(config, offlineConfig);
226
227
  // 开始进行打包流程
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taole/deploy-helper",
3
- "version": "0.6.5",
3
+ "version": "0.6.6",
4
4
  "description": "脚本部署工具,用于将项目部署到测试环境或生产环境",
5
5
  "main": "index.mjs",
6
6
  "type": "module",