@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.
- package/dist/plugin/PluginManager.js +13 -2
- package/package.json +1 -1
|
@@ -120,8 +120,19 @@ export class PluginManager {
|
|
|
120
120
|
// 開発環境では強制リロード(キャッシュをクリア)
|
|
121
121
|
globalLoadedPlugins.delete(packageName);
|
|
122
122
|
this.plugins.delete(packageName);
|
|
123
|
-
//
|
|
124
|
-
globalLoadingPlugins.
|
|
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
|
// 本番環境のみキャッシュを使用
|