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

Spreading into a reactive object?

I'm using Carbon Charts for data visualisation. The following are my options for an Area Chart which has a second Y axis as the two groups of values I'm trying to visualise correlate with each...

View Article


HTTPOnly Cookie not being set in browser localhost

ProblemI have a REST API that has a login endpoint. The login endpoint accepts a username and password, the server responds by sending a HTTPOnly Cookie containing some payload (like JWT).The approach...

View Article


Clicking anchor tags in sveltekit doesn't load page content unless I use...

I've tried to create dynamic nav menus by storing the menu data in a Pocketbase database, within a sveltekit store:lib/navMenuStore.jsimport { writable } from 'svelte/store';import PocketBase from...

View Article

Forward file (web worker) in dependency to be statically available (not...

My concrete Problem is also detailed hereI want to use a web worker defined in a dependency (I also only want to use it in this dependency) but I cannot find a way to load it as svelte-package ->...

View Article

VS Code acquireVsCodeApi(); not detected in web view

I am trying to design a VS Code extension using Typescript and Svelte. I want the extension to display a message when a button in the web view is clicked. For this, I have written the following...

View Article


Unable to Send Form Data from SvelteKit Server Endpoint to formsubmit.co/ajax

I'm working on a SvelteKit project where I need to send form data from a server endpoint to an external API (FormSubmit.co/ajax). I'm able to send the form data directly from the client-side (in a...

View Article

Deployment error: failed to launch: determine start command: process type web...

Currently recieving an error when attempting to deploy a svelte vite app on Digital Ocean. Does anyone know what is needed to be altered to correct the error described below?The code builds & runs...

View Article

Svelte 3 - How to loop each block X amount of times

I'm hoping to find a way to iterate over an #each block a set amount of times in Svelte 3. In Vue I would do something like this:<li v-for="i in 3"><!-- somecontent --></li>But as I...

View Article


SvelteKit - api response data (PageData) not updated after initial render

am new to svelte and svelteKit in general and am trying to load data from api and I followed the sveltekit todo sample code. It's working well for initial rendering and a tag onClick but in div...

View Article


Svelte typescript safe components

I am trying to take components and its types, put it to single variable and then use it on page.import { Container_01 } from './components/containers';import { Footer_01 } from...

View Article

How can I host a Svelte app in a subdirectory?

How can I host an exported Svelte project in a subdirectory on my domain? Imagine that example.com is my domain, how can I have src\routes\index.svelte correspond to https://example.com/subdir/?When I...

View Article

Image may be NSFW.
Clik here to view.

Google Tag Manager and SveletKit don't catch History Change event

I install gtm.js to my routes/+layout.svelte<script lang="ts"> // @ts-nocheck import { PUBLIC_TAG_ID } from "$env/static/public"; import { onMount } from "svelte"; onMount(() => {...

View Article

Svelte automatic imports do not work in Visual Studio Code

In preview application I was working on when I typed the name of the component. Like this:I gave an import. Automatically added to script.`<BaseSelect options={optionsDifficulty}...

View Article


Update component and filter array objects based on month

After a long time I came back to this amazing framework Svelte. I am creating my own calendar that will work with data from a mysql database. I am facing a problem that I cannot solve. My problem is in...

View Article

How to set break points in vsCode in a Svelte application

I am trying to debug a js file in my svelte App using vscode.The de-bugger starts correctly and the application runs. I suppose this means that my launch.json is correct.But vsCode will not set a break...

View Article


How to deploy a svelte kit app after build using nginx as web server

I have a svelte kit project. I want to deploy the app in an Nginx web server after an npm run build. At the moment I have a node container and I use to start using npm run preview. It's working fine,...

View Article

Role based routing-Svelte

I have a use case where routes are the same but the UI for those routes depends on the role selected by the user while setting up an account.roles are : Business Owner, Fleet manager, Operational...

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

I type npm run dev in the terminal but my project on visual studio code...

I want to run my program but it doesn't work. why? npm run devnpm ERR! Missing script: "dev"npm ERR! npm ERR! To see a list of scripts, run:npm ERR! npm runnpm ERR! A complete log of this run can be...

View Article

I want to get the event type of a svelte on:input event in typescript but I...

I have an input in svelte<input {type} {placeholder} on:input={(e) => emitChange(e)} class="pl-2 w-full h-full bg-sand border border-midnight dark:bg-midnight" />That goes into this function...

View Article
Browsing all 1539 articles
Browse latest View live


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