Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Browsing all 1539 articles
Browse latest View live
↧

Unit testing code that fires at the end of the intro animation in Svelte

I created a Svelte component that is meant to show quickly and then disappear, merely to communicate that the action took place and how many records were touched by the action.The component is very...

View Article


Pnpm monorepo, SvelteKit and Prisma : build error

I'm using turborepo (with pnpm workspaces) and having this architecture :- src/||- apps |_ front (svelte kit)|- packages |_ core (ts library with my business logic, including Prisma definition and...

View Article


How can i import svelte framework to a script tag in html file?

Here's the code where i wanna import svelte in. Fyi im using replit cuz i can't use laptop for immobilities. I tried using that link which y'all need to scroll down to see but not working. Another ways...

View Article

Error when evaluating SSR module even when SSR is disabled - svelte-kit

I wanted one of my route in my app not to be server side rendered.The way to do this will be doing export const ssr = false in module script or setting ssr: false in svelte.config.js as mention in...

View Article

How to load additional data in Sveltekits load function

In sveltekit, a +page.svelte renders the data that was loaded using a +page.ts load function.But what if there is a Button on the page like "more data..." to load additional data.How to tell the load...

View Article


Remember content in Svelte

In my SvelteKit project, I have a layout that should display all pages next to each other horizontally, but they all are 100vw wide, so only one is shown "within" the screen at a time (the other ones...

View Article

Sveltekit unable to read data from POST formdata

Just trying the below in Sveltekit (3.44) but the console always outputs:Got data FormData {}The request is simply (made via Postman):curl --request POST \ --url http://localhost:3000/todos.json \...

View Article

Svelte strongly type class of components

I am working on a component library that has a bit of a twist on how components are grouped. I am grouping components into classes to make using the library simpler for end users. Rather than...

View Article


How can I remove and re-add a click listener in Svelte?

<div on:click={handleClick}>Click here</div>Sometimes I want the div to be clickable, and sometimes I don't. How can I remove and add the click listener on demand?This is the workaround...

View Article


Generic type recognized as "any". How can my generic type be improved?

Edit: Solved. Answer edited belowI would like to create a Svelte dropdown component that accepts multiple kinds of possible items<MySelect options={...}. I've considered several...

View Article

Customize the Open WebUI landing page Running Docker

I want to customize the Open WebUI landing page. I've finished setting up the Open WebUI with the docker and wanted to make some changes to the landing page to have it more personalized. Looking...

View Article

Image may be NSFW.
Clik here to view.

How do i increase the size of the carousel taken from the flowbit-svelte...

I am currently working a project which requires a Carousel, so i integrated the flowbit-svelte in my svelte project. The carousel is working fine but i want to increase the size of the component,its...

View Article

How to create Web Worker in a SvelteKit app on Vercel?

I've created a SvelteKit webapp that works great on my desktop in my local environment. I launch the browser/webserver with:npm run dev -- --openNow I've just deployed to Vercel. Everything works...

View Article


Jest encountered an unexpected token during upgrade Svelte v3 to v4

I'm stucked during the upgrade of svelte v3 to v4 using the official guide. My tests are failing and I've tried multiple ways to fix it but nothing worked here for me. Here some details about my svelte...

View Article

How do I stream an OpenAI API response back from a Svelte server to deploy on...

The svelte documentation says you can return a response to a post call in a +svelte.js file withexport async function POST({ request }) { const { a, b } = await request.json(); return json(a + b);}But...

View Article


New element pushes away old element. How to animate in Sveltekit?

I have a simple question I couldnt solve several times already. It's when I render an element reactive it pushes away another element (on purpose). In this example an image is centered on my page. When...

View Article

Customize svelte slider styles

I am currently working on a slider that changes the visible content upon dragging. I'm trying to implement a custom button that says "drag" to control the slider progress. Here is my current code...

View Article


Error on Form Submit to API Route - Astro and Svelte

I'm using Astro and Svelte to build a Newsletter Form and on Form Submit it returns an 400 Error. When I hardcode the email in the API Route it works. However the email does not pass into the...

View Article

Svelte 5 reactive $state in external module (dragListener)

I am trying to refactor a dragListener into a .svelte.js module by defining the position of the dragged element as a reactive $state() variable inside +page.svelte and pass it back and forth between...

View Article

SvelteKit: [vite] [postcss] error - Unknown Word

I'm currently developing a desktop application using Tauri, SvelteKit, & Tailwind. When I run a dev build of my application I frequently get the following error: [vite] Internal server error:...

View Article
Browsing all 1539 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>