Svelte Kit using Testing Library not recognising href value
I am setting up some tests for a Svelte Kit project using Testing Library which are checking for the presence of HTML elements and subsequent values. At the moment I am writing these tests for my...
View ArticleWriting a google sheet to a github repo as json?
I'm an entry level coder please go easy on me. I'm working with some collaborators on a google sheet. I want to be able to pull in the data from the sheet to json file on my github repo that will...
View ArticleHow to serve a Svelte app frontend build in Django backend static?
The svelte app is normal svelte (not kit) with some routing. Build by npm run build into:/dist: /assets/index.js, /assets/index.css, index.html.I tried to follow this tutorial for React and expect it...
View ArticleTransition delay ignored in loop
There is a component that has fade transition with delay applied. Works as expected unless it is put inside a loop. In that case it ignores the delay property.Code of the component:<div in:fade={{...
View ArticlePath not allowed on the configured scope in tauri app
I'm using writeTextFile() function to write json data into this file 'src-tauri/databases/db.json .The readTextFile(resourcePath) work fine get the data from same json filei'm using sveltehere the...
View ArticleAdd meta tags to dynamic page in sveltekit
I have a blog built with Sveltekit an Sanity, the meta tags for the main page works, but when I try to use meta tags in my dynamic pages, they dont show up.I have tried svelte:head and even the...
View ArticleAstro + Svelte send form email
I'm using Astro + Svelte for a blog project but I'm running into some problems adding integrations. In my case, I want the information to be sent after submitting a contact form. I have tried to use...
View ArticleCenter an left/right and those elements are rotated based on the screen
I have a component called GameFrame, in which I have two kinds of elements, one is a table and the other one is player's hand. These are in the game-frame-container.I want to center the left and right...
View ArticleBuilds not being cached with sveltejs and vite
I have a svelte project (not sveltekit) that is being built/bundled by vite.The problem I am having is that the build times are growing unwieldly.Most of the time this project is being built without...
View ArticleHow to update js build process to fix "SyntaxError: Cannot use import...
I am having an easily reproducible error with the npm library @capacitor-community/apple-sign-in.You can reproduce by running:npm create svelte@latest my-appcd my-appnpm installnpm i...
View ArticleWant to save a photo taken on a phone in my SvelteKit project
My project allows the user to upload an image file from their desktop. If the user is on mobile, they can either take a photo from their phone's camera, or upload from their camera roll.Even though a...
View ArticleHow can I create this type of animation in svelte
Enter image description here Video Animation.How can I create this type of animation in svelte.js using library or using Tailwind css. Any javascript library would be helpful. If I can create the...
View ArticleIs there a way to run JavaScript from a string in browser with imported...
I have a function that lets me run a JavaScript function in the browser:export async function executeFunction(data: LoadOutput, input: Record<string, any>): Promise<any> { let args = [];...
View ArticleHow to handle refreshing an access token in a SvelteKit app?
The backend API gives out a access/refresh token pair on login. The access token is short lived and the refresh token is long lived.I was thinking about storing those tokens in a HttpOnly cookie.Then...
View ArticleIs there a way to declare props as optional in Svelte
I have created some components which take an optional prop like hide={true}. My problem is that these annoying error messages always flood my console when I don't pass that prop:<MyComponent> was...
View ArticleIs it possible to #await with onMount together
I'd like to use convenient #await Svelte helper when loading data with fetch().However, I noticed a warning at onMount tutorial [1]:It's recommended to put the fetch in onMount rather than at the top...
View ArticleSvelte: Selection not updating
I have a Svelte Selection that fetches data and displays it in a dropdown. Users can select various properties, and this functionality works well. However, now I want to preselect certain options;...
View ArticleHow to add a signature to a pdf document in a specific place using forms in...
i tried using jsPdf, signature pad but all i could do is add the signature to a pdf created using forms but i couldn't put the signature in the desired place.i need a solution for thisif I input a PDF...
View ArticleSveltekit Form Actions enhance
I have a basic form that I am trying to submit, with no luck.My main goal is to introduce a modal that has a "Are you sure you would like to submit the form", with a cancel and a submit (external)...
View ArticleAstro, seeing `X [ERROR] The build was canceled` in build output (npm run build)
I'm seeing the following the following error in the console logs on npm run build ("build": "astro check && astro build"). The build actually completes following this, but I don't like not...
View Article