SSR scripts for custom components into app HTML
This commit is contained in:
parent
66ab9dcc8b
commit
184936217c
|
@ -113,6 +113,7 @@ export const serveApp = async function (ctx: any) {
|
|||
production: env.isProd(),
|
||||
appId,
|
||||
clientLibPath: clientLibraryPath(appId, appInfo.version, ctx),
|
||||
usedPlugins: appInfo.usedPlugins,
|
||||
})
|
||||
|
||||
const appHbs = loadHandlebarsFile(`${__dirname}/templates/app.hbs`)
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
export let favicon = ""
|
||||
|
||||
export let clientLibPath
|
||||
export let usedPlugins
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
@ -85,9 +86,13 @@
|
|||
</script>
|
||||
<!-- Custom components need inserted after the core client library -->
|
||||
<!-- But before loadBudibase is called -->
|
||||
<script
|
||||
type="application/javascript"
|
||||
src="https://cdn.kingston.dev/plugin.min.js"></script>
|
||||
{#if usedPlugins?.length}
|
||||
{#each usedPlugins as plugin}
|
||||
<script
|
||||
type="application/javascript"
|
||||
src={`/plugins/${plugin.jsUrl}`}></script>
|
||||
{/each}
|
||||
{/if}
|
||||
<script type="application/javascript">
|
||||
if (window.loadBudibase) {
|
||||
window.loadBudibase()
|
||||
|
|
Loading…
Reference in New Issue