@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.
Files changed (2) hide show
  1. package/dist/core.js +8 -1
  2. 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
- const candidate = module?.default ?? module?.apply ?? module;
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yumerijs/core",
3
- "version": "3.0.0-alpha.2",
3
+ "version": "3.0.0-alpha.3",
4
4
  "description": "Core module for yumeri",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",