From 74438a31458af8bddd08d90eacc6d63677bab844 Mon Sep 17 00:00:00 2001 From: Jonas Dellinger Date: Fri, 13 May 2022 19:14:47 +0200 Subject: Work on react frontend loader --- frontend/src/index.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 frontend/src/index.ts (limited to 'frontend/src/index.ts') diff --git a/frontend/src/index.ts b/frontend/src/index.ts new file mode 100644 index 00000000..390b83c9 --- /dev/null +++ b/frontend/src/index.ts @@ -0,0 +1,16 @@ +import PluginLoader from './plugin-loader'; + +declare global { + interface Window { + DeckyPluginLoader?: PluginLoader; + } +} + +if (window.DeckyPluginLoader) { + window.DeckyPluginLoader?.dismountAll(); +} + +window.DeckyPluginLoader = new PluginLoader(); +setTimeout(async () => { + window.DeckyPluginLoader?.loadAllPlugins(); +}, 5000); -- cgit v1.2.3