@luna-editor/engine 0.3.1 → 0.3.2

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.
@@ -120,8 +120,19 @@ export class PluginManager {
120
120
  // 開発環境では強制リロード(キャッシュをクリア)
121
121
  globalLoadedPlugins.delete(packageName);
122
122
  this.plugins.delete(packageName);
123
- // ロード中のPromiseもクリア(再ロードを確実にするため)
124
- globalLoadingPlugins.delete(packageName);
123
+ // ロード中の場合はそのPromiseを待って完了させる(二重ロード防止)
124
+ const existingLoadPromise = globalLoadingPlugins.get(packageName);
125
+ if (existingLoadPromise) {
126
+ yield existingLoadPromise;
127
+ const loaded = globalLoadedPlugins.get(packageName);
128
+ if (loaded) {
129
+ this.plugins.set(packageName, Object.assign(Object.assign({}, loaded), { config: config !== null && config !== void 0 ? config : loaded.config }));
130
+ for (const [type, component] of loaded.instance.components) {
131
+ this.componentRegistry.set(type, component);
132
+ }
133
+ }
134
+ return;
135
+ }
125
136
  }
126
137
  else {
127
138
  // 本番環境のみキャッシュを使用
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luna-editor/engine",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Luna Editor scenario playback engine",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",