diff --git a/packages/client/src/index.js b/packages/client/src/index.js index bef3ab9c12..a795d8d2d9 100644 --- a/packages/client/src/index.js +++ b/packages/client/src/index.js @@ -40,17 +40,17 @@ const loadBudibase = () => { devToolsStore.actions.setEnabled(enableDevTools) // Register any custom components - window.registerCustomComponent = plugin => { - componentStore.actions.registerCustomComponent(plugin) - console.log("registered!") - loadBudibase() - } if (window["##BUDIBASE_CUSTOM_COMPONENTS##"]) { window["##BUDIBASE_CUSTOM_COMPONENTS##"].forEach(component => { componentStore.actions.registerCustomComponent(component) }) } + // Make a callback available for custom component bundles to register + // themselves at runtime + window.registerCustomComponent = + componentStore.actions.registerCustomComponent + // Create app if one hasn't been created yet if (!app) { app = new ClientApp({