Questions tagged [svelte]
Svelte is a component framework — like React or Vue. On-topic questions include code using Svelte and how to configure it and use it in your javascript pipelines.
svelte
6,009
questions
0
votes
0
answers
15
views
How to run my html5 game made with godot 4 on my own website?
I have a website made with sveltekit and I want to add a flappy bird made with godot 4, when I export the game and upload it to itch.io the game runs and runs fine, but when I use an iframe to run my ...
-1
votes
0
answers
16
views
Tailwind css responsive design: overrides not being applied
I am making a website using svelte, vite and tailwind (through flowbite svelte).
I am facing an issue and I can't figure out how to fix it unfortunately.
I was using the flowbite navbar, but then I ...
0
votes
0
answers
3
views
Migrate conditional custom element compilation in Svelte Rollup config to SvelteKit Vite config
In my Svelte 3 component library I'm using this Rollup configuration to conditionally render custom elements. Only files with the *.wc.svelte extension are compiled as HTML5 web components.
export ...
0
votes
1
answer
19
views
SvelteKit + Vercel Serverless Function Crash : [ERR_INVALID_MODULE_SPECIFIER]
I would sure be glad if someone could help me here...
My website is built using SvelteKit (v2), with Prismic as a CMS, and deployed via Vercel.
Everything runs smoothly locally, with no error, in the ...
0
votes
0
answers
40
views
Vite is trying to read svelte.config.js even thought Svelte settings are inside vite.config.js
Vite (or one of its plugins) is trying to read a svelte.config.js file that I've never used, even though my Svelte configuration is inside vite.config.js.
❯ bun dev
$ vite --host
Error reading svelte....
0
votes
0
answers
27
views
<Svelte> 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,...
0
votes
1
answer
25
views
Svelte 5 false positive - Cannot find module 'svelte-filepond' or its corresponding type declarations
Stack: Svelte 5 / SvelteKit / Filepond
I'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, ...
1
vote
1
answer
24
views
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....
0
votes
0
answers
14
views
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 www....
1
vote
1
answer
57
views
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 objects
Let's assume we got some data structure similar to @...
0
votes
1
answer
29
views
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/ ...
5
votes
1
answer
45
views
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 on:click={...
0
votes
1
answer
24
views
Tailwind max-w-[number] not working past a certain point
My stack is Svelte 5 / Sveltekit / Tailwind / Daisy UI
I 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 ...
0
votes
2
answers
27
views
Is it possible set event callback on inside a component and outside a component and have callbacks both run?
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.svelte
import ...
0
votes
2
answers
47
views
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 ...