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

How can I programmatically generate SvelteKit routes?

I've been working on a simple CMS with SvelteKit. I want authenticated users to be able to create new pages or layouts within the application. I'm not sure if this would require the actual generation...

View Article


Can I use React components in Svelte?

I am really new to Svelte, but cannot find answer to my question anywhere.I am trying to use this React component in Svelte:https://developer.microsoft.com/en-us/fabric#/controls/web/stack(I guess it...

View Article


Is it possible set event callback on inside a component and outside a...

I want to run two functions: one on:blur inside a component, and one on the component from the outside.// CustomInput.svelte<input on:blur={() => console.log(1)} />// App.svelteimport...

View Article

visible, non-interactive elements with an on:click event must be accompanied...

A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.svelte (a11y-click-events-have-key-events)what does this error mean ?...

View Article

Retrocompatibility for Webapp

I just created an app with fastify, that in a specific route returns the builded version of an Svelte website (built with rollup)It worked perfectly on my machine and phone, but when I went to show it...

View Article


Does Svelte have the mechanism to listen to only nested properties changes?

I need to do some logic on nested property change. I only found that thing to do that$: c, console.log('updated');This approach was suggested by official svelte developer from this Twitter thread.But...

View Article

How do I import Bootstrap in SvelteKit, Recommended Way?

I am building a site with SvelteKit. As of now I included Bootstrap 5 in my project by adding it to the app.html file provided by the SvelteKit Skeleton project:<!-- Bootstrap styles and javascript...

View Article

Tailwind max-w-[number] not working past a certain point

My stack is Svelte 5 / Sveltekit / Tailwind / Daisy UII have a svelte component that uses a Daisy UI card and I am unable to get tailwind max-w-[number] class to work past a certain point to increase...

View Article


Why does the following event handler work in a Svelte component?

I have the following component Form.svelte:<script> export let onDelete;</script><form><button type="submit">Update</button><button...

View Article


How to dynamically import json data using Svelte

I have previously been testing a component using the following code<script>import x from "/path/to/x.json"</script>this, as expected loads the json file to variable x.What I would like to...

View Article

Sveltekit redirecting to a route that no longer exists

tldr: The app redirects / -> /home, but now /home has been moved to /auth/home, and the new redirect won't work.On a previous version of my app, I had a file structure like this:src/routes/...

View Article

Bundle JS and CSS into single file with Vite

I'm having a devil of a time figuring out how to build a single .js file from Vite in my Svelte project that includes all of the built javascript and CSS from my Svelte projects. By default, Vite...

View Article

How to add bookmarks in html when using svelte-spa-router?

For many reasons, I can't use Sveltekit. So I'm using svelte-spa-router for my SPA.The way you use the router is by adding hyperlinks like <a href="#about"/>. That makes the url...

View Article


SvelteKit goto keeps executing code after

On the client side, I send a JWT to the backend API for certain requests. If there is some issue with the JWT or it's not refreshed, I want to cancel everything and direct the user to the sign-in page....

View Article

SvelteKit: How to specify port number on node build?

I'm trying to develop a series of SvelteKit apps for my business. I want to run them all on the same Windows Server using Node; they're fairly small.I can deploy the first one (using the SvelteKit Node...

View Article


Three.js not loading gltf file

I was using three.js with svelte for a project and when I try to load a 3d model the server returns with 404 not found. here is my code to load the file(Scene.js)import * as THREE from 'three';import...

View Article

Svelte store with deeply nested objects

I just swithced from React(+Redux) to Svelte and faced bunch of problems which I cannot solve by myself. Main one is binding deeply nested objectsLet's assume we got some data structure similar to...

View Article


Svelte 5 false positive - Cannot find module 'svelte-filepond' or its...

Stack: Svelte 5 / SvelteKit / FilepondI'm getting a false positive for a missing Filepond dependency in my SvelteKit app. In a custom svelte component I'm importing Filepond like so:import FilePond, {...

View Article

Using $env with SvelteKit and Docker

SvelteKit provides a good and easy way to use ENV variables:https://learn.svelte.dev/tutorial/env-static-publicIm using Docker in a CI pipeline to create images. However when running RUN npm run build...

View Article

making image-map in mobile

I'm trying to make image-mapping in svelte.Actually, this is working in PC but not in mobile.So, I wanted to import rwdImageMaps and this is controlled by jQuery.Because of this, I installed jQuery,...

View Article
Browsing all 1539 articles
Browse latest View live


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