@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.
- package/lib/offlinePkg.mjs +2 -1
- package/package.json +1 -1
package/lib/offlinePkg.mjs
CHANGED
|
@@ -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
|
// 开始进行打包流程
|