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

Vite is trying to read svelte.config.js even thought Svelte settings are...

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 --hostError reading...

View Article


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 dev...

View Article


Implementing a loading spinner in sveltekit that is triggered during an action

I have a simple form having email, password and confirmPassword. I use action to handle this. I want to implement a spinner that will be triggered for the following actionsChecking if user is currently...

View Article

Is it possible to render svelte component's (end result) HTML code as a...

I have a simple PrimaryButton.svelte component that contains "HTML" only (no script or style tags) and looks like this:<button class="btn-primary btn accent--br">Primary button</button>Then...

View Article

Prevent overscroll/overflow in Skeleton UI Modal component

I am using the Modal from Skeleton UI in my Mobile application, it works great except for one thing, every time the modal is opened it briefly displays a scroll bar and it makes it look kinda odd. I've...

View Article


Migrate conditional custom element compilation in Svelte Rollup config to...

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...

View Article

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 had...

View Article

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...

View Article


Search component with a dropdown using svelte and shadcn-svelte

I'm trying to create a search component using Svelte and shadcn-svelte UI component library,Where I'll have a dropdown visible below the search input, when the user type a text that does exist in the...

View Article


Svelte custom event on svelte typescript

I'm using clickOutside directive on my svelte-typescript project and I'm getting this error when I assign custom event to the related elementType '{ class: string; onclick_outside: () => boolean; }'...

View Article

Is there a convenient way to reference a DOM element in Svelte components?

I am used to libs/frameworks like React or Angular which both have convenient ways to access actual DOM elements that belong to logical components. React has the createRef utility and Angular has among...

View Article

Svelte Carousel nav dots active colors aren't transitioning with slides

I'm working on a carousel component using schadcn-svelte and embla carousel. The initial click on dot 2 transitions from slide 1 to slide 2, and the active dot styles update perfectly. However after...

View Article

ERROR: Module not found: Error: Package path . is not exported from

I am using Node and express along with svelte on the frontend, I have npm installed the "socket.io-client" package on the client side, but when I try to import it, I get this error.I see this error...

View Article


What is the purpose of data-svelte-h in Svelte SSR?

I am new to Svelte and have noticed that some elements in the SSR code generated by Svelte include a special data-svelte-h attribute on them, mostly static elements but I can't seem to find a...

View Article

classList.add method doesn't work and component is rerendered when clicking...

I want to make the image upload box open and close. In my code, the opening function works, but for some reason, the closing function doesn't work. Additionally, when I use console.log in the functions...

View Article


Svelte Each function in Nested Json

I have nested JSON Arraylet car = [{ name: "BMW", detail: [ {name: headlight, type: flame}, {name: taillight, type: spark}, ],},{ name: "Merced Benz", detail: [ {name: headlight, type: spark}, {name:...

View Article

Image may be NSFW.
Clik here to view.

How to deploy Sveltekit app in node server with HTTPS?

I'm want to deploy my Sveltekit app on HTTPS server. I have key files also. This is my svelte.config.js fileimport preprocess from 'svelte-preprocess';import node from '@sveltejs/adapter-node';import...

View Article


Is there a way to submit a form with multiple copies of the same fields (or...

I've got the following component:<script> export let componentID; console.log("component iD", componentID)</script><div><div class="grid grid-cols-1 gap-x-6 gap-y-8...

View Article

Why does my messageStore resets whenever I edit it in SvelteKit

I am having an issue with messageStore which is a simple writable(""). I use it to display any messages in +layout.svelte<script> import '../app.css'; import NavBar from...

View Article

How to receive array of object in Sveltekit Action?

I'm new to Sveltekit,I have a form with the input names set like so:input 1: config[0][name]input 2: config[0][type]input 3: config[1][name]input 4: config[2][type]here in the Sveltekit Action I tried...

View Article
Browsing all 1539 articles
Browse latest View live