1
0
Fork 0
mirror of synced 2024-09-17 01:38:40 +12:00

Use raw server jsUrl when rendering plugins

This commit is contained in:
Andrew Kingston 2022-10-04 15:01:18 +01:00
parent 5e42c84a5b
commit c986fb164e

View file

@ -16,7 +16,6 @@
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"
@ -48,8 +47,6 @@
!$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
$: { $: {
@ -95,8 +92,7 @@
<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 <script src={`${plugin.jsUrl}?r=${plugin.hash || ""}`}></script>
src={`${pluginsUrl}/${plugin.jsUrl}?r=${plugin.hash || ""}`}></script>
{/each} {/each}
{/if} {/if}
</svelte:head> </svelte:head>