@yumerijs/loader 1.1.0 → 1.1.1

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/index.js +6 -2
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -71,10 +71,11 @@ class PluginLoader {
71
71
  * @throws 如果插件加载失败.
72
72
  */
73
73
  async load(pluginName) {
74
- if (this.pluginCache[pluginName]) {
75
- this.logger.info(`Returning cached plugin: ${pluginName}`);
74
+ if (this.pluginCache[pluginName] && !this.isDev) {
75
+ // this.logger.info(`Returning cached plugin: ${pluginName}`);
76
76
  return this.pluginCache[pluginName];
77
77
  }
78
+ // this.logger.info('test')
78
79
  let pluginPath;
79
80
  let isLocalPlugin = false;
80
81
  // 1. 检查是否是本地插件目录下的插件
@@ -117,6 +118,9 @@ class PluginLoader {
117
118
  this.logger.error(`Failed to load plugin from ${pluginPath}:`, e);
118
119
  throw e;
119
120
  }
121
+ // const plugin = require(pluginName);
122
+ // this.pluginCache[pluginName] = plugin;
123
+ // return plugin;
120
124
  }
121
125
  /**
122
126
  * 从指定路径加载插件.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yumerijs/loader",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Module loader for yumeri",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -31,7 +31,7 @@
31
31
  "typescript": "^5.8.2"
32
32
  },
33
33
  "dependencies": {
34
- "@yumerijs/core": "1.1.0",
34
+ "@yumerijs/core": "^1.1.0",
35
35
  "chokidar": "^4.0.3",
36
36
  "semver": "^7.7.1",
37
37
  "ts-node": "^10.9.2"