How to serve static files on CloudFoundry?
I have a svelte project that basically is a database of links to internal or external files represented visually as a table. Nothing uber-fancy.So, I've read in other post on StackOverflow that I have...
View Articlebackground-image svg scaling not working svelte
So I have multiple < p > elements inside a < div > which is inside an overall container. The container has an svg graphic as a background image with the top and bottom being wavy sides (so...
View ArticleStripe doesn't believe client_secret is created with my account
I'm attempting to setup stripe connect payments on svelte-kit, however stripe keeps returning an error:The client_secret provided does not match any associated PaymentIntent on this account. Ensure the...
View ArticleSvelte 5, Problem with tests, why am I getting this overload error in my...
My vite.config is supporting a Svelte 5 appUse '@' to resolve ./srcSupport tests like vitest (or jest if I need to change)import { defineConfig } from 'vite';import { sveltekit } from...
View ArticleLoading data server side and allow global access client side
I'm having a hard time understanding the use of Runes and data loading.I load a supabase json file and I want to access the data globally.// +page.server.jsexport async function load() { const...
View ArticleHow do I override my SvelteKit CSRF token to match my Django backend's CSRF...
Let me start by clarifying that I am using Django on the backend, but then using Svelte and SvelteKit on the "frontend". I am also using Allauth Headless for authentication.When I remove...
View ArticleSvelte dev server is stuck on old version
I'm using Svelte with Rollup. I've always had a great dev server experience using npm run dev. Now, though the dev server seems stuck on an older version of my application. If I deploy with run build I...
View ArticleSvelteKit streamed promises sometimes return 0 elements and sometimes a...
I have written the below code in a +page.server.ts file:const mediaItemComments = mediaItemComment.getByRequestId(params.id);return { request, streamed: { record, mediaItemComments, client:...
View Articlesveltekit saving offline/online status for the entire app
What is the best approach to save and use online/offline status all over a client side only app created with sveltekit?Session/Cookies?The app deployed as static using addapter_static, as PWA with...
View ArticleGetting height of dynamically added HTML element
I retrieve HTML text from a database and I am performing some animation to display the content. In order to keep layout clean I want to get the height and width of the element and empty it before...
View ArticleDisable certain a11y warnings globally in sveltekit
Sveltekit has very strict a11y checks, for instance you can't just add on:click to a div.I can suppress it on a per-line bases, e.g.:<!-- svelte-ignore a11y-click-events-have-key-events...
View ArticleHow do I create a custom input svelte component and reuse prop types?
I'm trying to create a wrapped version of an input component with a label, I want it to have all the same attributes as the normal input field, as well as the "label".I'm slightly confused about how to...
View ArticleWhy value property on input element on svelte is not working?
I want to manage the value of a state (to make custom validations, so I won't use bind:value) to pass into my input, but the value displayed in the input is not the value I have in the a state, why...
View ArticleSvelt app no longer executes the load function after build
When I run my Svelte app in the preview, it works fine, but as soon as I build it, the load function is no longer executed. To make sure, invalidateAll is executed every second for testing, this also...
View ArticleCSS on Svelte 5 website is suddenly completely ruined
I need some serious help. I've been working on my very first real-world Svelte 5 project, which is a website for a roofing contractor.Everything was going very well, until yesterday when I updated my...
View ArticleGoing back to a url doesn't update the page
There's a page showing a student list. It should support pagination (via ?page=).Going from ?page=0 to ?page=1 -> page is updatedGoing back from ?page=1 to ?page=0 -> page is not updated (unless...
View ArticleHydration issue when server-side loading HTML content
I am loading HTML content from a Supabase repo. When I display the content without the @html tag it shows (as plain text), but when I encapsulate it with {@html ...} nothing is shown and I get a...
View ArticleSvelte 5: Form briefly appears then disappears on page load when using...
I'm encountering a strange issue with a Svelte 5 component where a form briefly flashes on the screen for about half a second when the page loads, and then disappears. This happens when I have...
View ArticleBind to imported $state in svelte5 (error "constant_binding")
// states.svelte.jsexport let name = $state("John"); // a state to be shared by multiple components<!-- Component.svelte --><script> import { name } from...
View ArticleSvelteKit: "No overload matches this call" error invite.config.js when...
I just created an app with pnpx sv create sveltekit-test2and checked vitestand now when I run pnpm check I get this error:Loading svelte-check in workspace:...
View Article