budibase/packages/client/src/index.js

18 lines
354 B
JavaScript
Raw Normal View History

import ClientApp from "./components/ClientApp.svelte"
2019-09-07 07:50:35 +02:00
let app
const loadBudibase = () => {
// Destroy old app if one exists
if (app) {
app.$destroy()
}
// Create new app
app = new ClientApp({
target: window.document.body,
2020-05-29 15:06:10 +02:00
})
}
// Attach to window so the HTML template can call this when it loads
window.loadBudibase = loadBudibase