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

New values not being loaded for .env for SvelteKit app

I am unable to get Sveltekit to read the latest values from .env.Any help on where are these old values coming from?I have tried the following ways:1.import { SALESFORCE_CLIENT_SECRET,...

View Article


How to reassign types to vite iso-imports

Im using a library thats telling me in the documentation to use vite iso-import for their sveltekit integration. After following their instructions, I lose access to the library types.I try to regain...

View Article


Merge One Sveltekit App into another Sveltekit App

I have two Sveltekit apps.A. Is a normal website appB. Exists inside electronI want A the normal Sveltekit website, to import B Sveltekit app running in electron.Why? so any changes I make to electron...

View Article

How can svelte ease between two colors?

Does svelte have built-in support for tweening/easing between two colors, or should I write my own interpolation function for that?I want a div to change background color, and I could supply the CSS...

View Article

Lodash is undefined when testing a Svelte app with Jest

I'm trying to use Jest to test my Svelte project, and everything I've read says that I need to include svelte-jester to transform my Svelte code into something that Jest can process (CommonJS, I...

View Article


sveltekit adapter-node docker volume issue serving updated static files after...

I work on a sveltekit app which is run in docker in production environment.I need to serve some "static" files uploaded from another server to production server and serve them from my app. Ok, they are...

View Article

Astro fails with svelte-testing-library

I'm building a website using Astro and a Svelte integration. For testing I added svelte-testing-library which runs fine when being executed with npm test.Unfortunately after adding the component tests...

View Article

How can I update class on an element before the website loads (before onMount)?

I added dark mode to my Svelte + Tailwind website. I did this by first checking for the user's preferred (system default) theme, but also added a button to change it anytime. I essentially just update...

View Article


tooltips on Svelte chart made with Layer Cake?

I'm trying to add tooltips to a chart I made with Layer Cake, the graphics framework for Svelte. I looked at the Map example on the Layer Cake site, as that one has tooltips, but I can't figure out how...

View Article


image-contain not fitting portrait image in parent container

When the image is of portrait orientation, it will show with the width as the width of the container, even though it is taller than that and i am using object-contain in my tailwind classes. I am using...

View Article

Svelte how to have duplicate keys in a keyed each

I have a simple clicker app, that stores the number as a list (500 being [5,0,0]). Here's my current implementation:{#each numbers as number (number)}<h1...

View Article

How can I import ActionData?

I'm evaluating Svelte for a project, and I'm stuck on importing ActionData; here's the error:Module '"./$types"' has no exported member 'ActionData'.Here's how I'm trying to import it, in a...

View Article

Data import issue for RSS in Svelte

novice here, trying to experiment with showing my blog and have managed to get an RSS feed in VS code terminal on a page.server.js however can't figure out how to use it.Here's the code: In...

View Article


VS code and Svelte for vscode extension ERROR

I have a problem, when i launch vscode, everything is fine, i can find definitions for paths, i can use ctrl + click on path and it finds where is the code from. But immediately when extension Svelte...

View Article

Non-blocking state update

there! I was wondering if Svelte has a way to update state in a non-blocking fashion.Here's artifically slow tabs example. https://svelte.dev/repl/565c333f0ab141c1a97e96f855d2e7d0?version=4.2.12As you...

View Article


Svelte reactivity affected by initial variable value

I've started working with Svelte and I stumbled upon some unexpected behavior. This is the snippet of my app source let currentPage = 1; $: if (currentPage || $selectedOption) { fetchPage(currentPage,...

View Article

Deploy SvelteKit with AWS Amplify

Hi I've been trying to deploy my Svelte kit 1.0 to AWS Amplify. I push the commits and then Amplify builds and verify the app pass , but then if I visit the app URL it's just a blank page. Please see...

View Article


set initial x state value by variable?

When using x state app machine. How do I set the initial state to a variable? I want the intial state to be either full screen or menu, when the boolean value is sent from another file. I want to send...

View Article

Deploying sveltekit app with gunjs on vercel throws cannot find module...

I have a sveltekit app in which i use gunjs as a db with user auth etc...(This error problem didnt exist before i added gunjs auth)The problem now is that when i use vercel to deploy the app it throws...

View Article

How can I use svelte-canvas in sveltekit?

I am learning sveltekit and I would like to use svelte-canvas in my project. I have a component called Globe.svelte<script> import { onMount } from "svelte"; import { Canvas, Layer } from...

View Article
Browsing all 1539 articles
Browse latest View live


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