Merge pull request #8006 from Budibase/cloud-plugins
Use CDN when fetching plugins in cloud
This commit is contained in:
commit
c5aedcd05c
|
@ -16,6 +16,7 @@
|
||||||
themeStore,
|
themeStore,
|
||||||
appStore,
|
appStore,
|
||||||
devToolsStore,
|
devToolsStore,
|
||||||
|
environmentStore,
|
||||||
} from "stores"
|
} from "stores"
|
||||||
import NotificationDisplay from "components/overlay/NotificationDisplay.svelte"
|
import NotificationDisplay from "components/overlay/NotificationDisplay.svelte"
|
||||||
import ConfirmationDisplay from "components/overlay/ConfirmationDisplay.svelte"
|
import ConfirmationDisplay from "components/overlay/ConfirmationDisplay.svelte"
|
||||||
|
@ -47,6 +48,8 @@
|
||||||
!$builderStore.inBuilder &&
|
!$builderStore.inBuilder &&
|
||||||
$devToolsStore.enabled &&
|
$devToolsStore.enabled &&
|
||||||
!$routeStore.queryParams?.peek
|
!$routeStore.queryParams?.peek
|
||||||
|
$: objectStoreUrl = $environmentStore.cloud ? "https://cdn.budi.live" : ""
|
||||||
|
$: pluginsUrl = `${objectStoreUrl}/plugins`
|
||||||
|
|
||||||
// Handle no matching route
|
// Handle no matching route
|
||||||
$: {
|
$: {
|
||||||
|
@ -92,7 +95,8 @@
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
{#if $builderStore.usedPlugins?.length}
|
{#if $builderStore.usedPlugins?.length}
|
||||||
{#each $builderStore.usedPlugins as plugin (plugin.hash)}
|
{#each $builderStore.usedPlugins as plugin (plugin.hash)}
|
||||||
<script src={`/plugins/${plugin.jsUrl}?r=${plugin.hash || ""}`}></script>
|
<script
|
||||||
|
src={`${pluginsUrl}/${plugin.jsUrl}?r=${plugin.hash || ""}`}></script>
|
||||||
{/each}
|
{/each}
|
||||||
{/if}
|
{/if}
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
Loading…
Reference in New Issue