Skip to content

Commit 4f4f36b

Browse files
committed
修复:打包依赖判断问题
1 parent e49e5fc commit 4f4f36b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

electron/mapi/manager/plugin/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ export const ManagerPlugin = {
283283
if (!config.versionRequire) {
284284
config.versionRequire = '*'
285285
}
286-
if (!VersionUtil.match(config.versionRequire, AppConfig.version)) {
287-
throw `PluginVersionNotMatch : ${config.name}`
286+
if (!VersionUtil.match(AppConfig.version, config.versionRequire)) {
287+
throw `PluginVersionNotMatch:-2:${config.name}`
288288
}
289289
},
290290
async parsePackage(file: string, option?: {}) {
@@ -362,8 +362,8 @@ export const ManagerPlugin = {
362362
if (!plugin.platform.includes(platformName())) {
363363
throw `PluginNotSupportPlatform : ${plugin.name}`
364364
}
365-
if (!VersionUtil.match(plugin.versionRequire, AppConfig.version)) {
366-
throw `PluginVersionNotMatch : ${plugin.name}`
365+
if (!VersionUtil.match(AppConfig.version, plugin.versionRequire)) {
366+
throw `PluginVersionNotMatch:-1:${plugin.name}`
367367
}
368368
const runtime = plugin.runtime
369369
delete plugin.runtime

0 commit comments

Comments
 (0)