@yumerijs/core 3.0.0-alpha.2 → 3.0.0-alpha.3
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/dist/core.js +8 -1
- package/package.json +1 -1
package/dist/core.js
CHANGED
|
@@ -28,7 +28,14 @@ function mergePluginMeta(target, source) {
|
|
|
28
28
|
return target;
|
|
29
29
|
}
|
|
30
30
|
export function resolvePluginModule(module, context, config) {
|
|
31
|
-
|
|
31
|
+
let candidate;
|
|
32
|
+
// 只有对象模块才取 default/apply
|
|
33
|
+
if (typeof module === 'object' && module !== null) {
|
|
34
|
+
candidate = module.default ?? module.apply ?? module;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
candidate = module;
|
|
38
|
+
}
|
|
32
39
|
let plugin;
|
|
33
40
|
if (isClassPlugin(candidate)) {
|
|
34
41
|
plugin = new candidate(context, config);
|