Import image assets as needed to allow proper bundling

This commit is contained in:
Andrew Kingston 2021-03-31 19:58:30 +01:00
parent 183e33ae82
commit 17c06cfb84
7 changed files with 14 additions and 12 deletions

View File

@ -1,11 +1,12 @@
<script>
import Spinner from "components/common/Spinner.svelte"
import { fade } from "svelte/transition"
import Logo from "/assets/bb-logo.svg"
</script>
<div class="ag-overlay-loading-center loading-container">
<div transition:fade class="loading-overlay">
<img height="30" width="30" src="/assets/bb-logo.svg" alt="Budibase icon" />
<img height="30" width="30" src={Logo} alt="Budibase icon" />
<span> Loading Your Data </span>
<Spinner size="12" />
</div>

View File

@ -19,6 +19,7 @@
import { post } from "builderStore/api"
import analytics from "analytics"
import { onMount } from "svelte"
import Logo from "/assets/bb-logo.svg"
//Move this to context="module" once svelte-forms is updated so that it can bind to stores correctly
const createAppStore = writable({ currentStep: 0, values: {} })
@ -242,7 +243,7 @@
{/if}
</div>
</div>
<img src="/assets/bb-logo.svg" alt="budibase icon" />
<img src={Logo} alt="budibase icon" />
{#if submitting}
<div in:fade class="spinner-container">
<Spinner />

View File

@ -6,6 +6,7 @@
import FeedbackNavLink from "components/feedback/FeedbackNavLink.svelte"
import { get } from "builderStore/api"
import { isActive, goto, layout } from "@roxi/routify"
import Logo from "/assets/bb-logo.svg"
// Get Package and set store
export let application
@ -49,7 +50,7 @@
<div class="topleftnav">
<button class="home-logo">
<img
src="/assets/bb-logo.svg"
src={Logo}
alt="budibase icon"
on:click={() => $goto(`/builder/`)} />
</button>

View File

@ -1,13 +1,12 @@
<script>
import { onMount } from "svelte"
import { Button, Spacer, Modal } from "@budibase/bbui"
import { Button, Modal } from "@budibase/bbui"
import { store, hostingStore } from "builderStore"
import { notifier } from "builderStore/store/notifications"
import api from "builderStore/api"
import Spinner from "components/common/Spinner.svelte"
import DeploymentHistory from "components/deploy/DeploymentHistory.svelte"
import analytics from "analytics"
import FeedbackIframe from "components/feedback/FeedbackIframe.svelte"
import Rocket from "/assets/deploy-rocket.jpg"
let loading = false
let deployments = []
@ -63,7 +62,7 @@
<h4>It's time to shine!</h4>
<Button secondary medium on:click={deployApp}>Deploy App</Button>
</div>
<img src="/assets/deploy-rocket.jpg" alt="Rocket flying through sky" />
<img src={Rocket} alt="Rocket flying through sky" />
</section>
<Modal bind:this={feedbackModal}>
<FeedbackIframe on:finished={() => feedbackModal.hide()} />

View File

@ -8,16 +8,14 @@
BugIcon,
} from "components/common/Icons"
import BuilderSettingsButton from "components/start/BuilderSettingsButton.svelte"
import Logo from "/assets/budibase-logo.svg"
let modal
</script>
<div class="root">
<div class="ui-nav">
<div class="home-logo">
<img src="/assets/budibase-logo.svg" alt="Budibase icon" />
</div>
<div class="home-logo"><img src={Logo} alt="Budibase icon" /></div>
<div class="nav-section">
<div class="nav-top">
<Link icon={AppsIcon} title="Apps" href="/" active />

View File

@ -6,6 +6,7 @@
import { Button, Heading, Modal, Spacer } from "@budibase/bbui"
import TemplateList from "components/start/TemplateList.svelte"
import analytics from "analytics"
import Banner from "/assets/orange-landscape.png"
let hasKey
let template
@ -65,7 +66,7 @@
</div>
<div class="banner">
<img src="/assets/orange-landscape.png" alt="rocket" />
<img src={Banner} alt="rocket" />
<div class="banner-content">
Every accomplishment starts with a decision to try.
</div>

View File

@ -9,6 +9,7 @@ export default ({ mode }) => {
base: "/builder/",
build: {
minify: isProduction,
outDir: "../server/builder",
},
plugins: [
svelte({