Skip to main content

All Questions

Tagged with
0 votes
1 answer
62 views

css gets transitioned at first mount

I have a svelte app that mounts some progress dots into a pretty plain html site. simplified the ProgressDots.svelte has this: hello <div class="progress-dots"> <div class="...
munHunger's user avatar
  • 3,061
1 vote
2 answers
82 views

How to check when window becomes available?

I am new to SvelteKit and I am not familiar with SSR. I have recently learned that window is only defined after the client-side has been loaded, which can be determined with the onMount hook. But here'...
Donald Zhu's user avatar
0 votes
1 answer
28 views

How to solve iife/umd conflict with supabase

I have installed supabase using npm install @supabase/supabase-js I am using Svelte and use nvm use 16.16.0 In my script I have the line import { createClient } from '@supabase/supabase-js' I get ...
Psionman's user avatar
  • 3,749
1 vote
0 answers
53 views

Why does Chrome black out, or crash with "aw, snap - out of memory" when there is still plenty of memory available?

I'm developing a Svelte-based Javascript single-page app with a lot of Apache ECharts displays in it that is fairly heavy in both DOM elements and array data, but generally stays in the 400-500MB ...
Paul W's user avatar
  • 12.2k
1 vote
0 answers
79 views

Svelte 5 memory leak in simple example

I'm encountering many memory leaks when using both Svelte 4 and 5 on reasonably complex projects, and having trouble identifying what I'm doing wrong. Here is an extremely simplified Svelte 5 example (...
chris838's user avatar
  • 5,188
0 votes
1 answer
28 views

Parameters in svelte action not reactive

Svelte action that does things when keys are pressed: import type { Action } from "svelte/action" export const keys: Action<HTMLElement, boolean> = (node, active?: boolean) => { ...
Alex's user avatar
  • 66.3k
0 votes
2 answers
49 views

Svelte input blur triggered when element is focused

Maybe its not related to svelte, but if do some DOM changes after input is focused, for example <input onfocus={() => toggleVisibiltyOfOtherElement = true } onblur={() => console.log("...
Alex's user avatar
  • 66.3k
0 votes
2 answers
77 views

Svelte 5 Unsafe State Mutation at Tree Component

I need help with Svelte components. I've built a tree that should allow users to check nodes and update related nodes. When a node is checked, its parents and children should react accordingly. ...
Korte Meyer's user avatar
-3 votes
1 answer
35 views

Svelte multiple small components vs regular html elements

Does it affect performance having svelte components instead of regular HTML elements, for small things like buttons, links etc? Wrapping these elements in a svelte component would make it more ...
Alex's user avatar
  • 66.3k
0 votes
1 answer
49 views

How to display Portable Text block content images in SvelteKit

I'm trying to render a blog post from Sanity Studio in my SvelteKit project. Currently, all of the text etc is being displayed, but images within the block content aren't. Below is what I have tried ...
user30014273's user avatar
1 vote
0 answers
61 views

@rollup/plugin-typescript TS2307: Cannot find module '../xxx/HelloWorld.svelte' or its corresponding type declarations

TS FILE import App from "../xxx/HelloWorld.svelte"; const app = new App({ target: document.body, }); export default app; TSCONFIG.JSON { "extends": "@tsconfig/svelte/...
Henry Lodge's user avatar
0 votes
1 answer
79 views

How to iterate over an object reactively?

I need to iterate over an object. The object is declared with: const obj = $state({ one: { checked: true }, two: { checked: false }, three: { checked: true } }); In my Svelte ...
Jacob Runge's user avatar
0 votes
0 answers
25 views

GovUK-frontend issue: new FileUpload component with Svelte

I am trying to get the new enhanced FileUpload component in govuk-frontend 5.9.0 working in a Svelte 4 and my code looks as follows: import {onMount} from 'svelte'; import { FileUpload } from '...
vogomatix's user avatar
  • 5,091
0 votes
2 answers
57 views

Make tooltip enterable/interactive

I have a tooltip component that uses Javascript to attach mouseover,mouseout event listeners to an element and on mouseover instantiates a tooltip component. I would like to make my tooltips ...
Paul W's user avatar
  • 12.2k
0 votes
1 answer
78 views

SvelteMap not reactive

I'm trying to use SvelteMap: https://svelte.dev/docs/svelte/svelte-reactivity#SvelteMap but for some reason it's not reactive. I am exporting it from a .svelte file: export const items = new SvelteMap&...
Alex's user avatar
  • 66.3k

15 30 50 per page
1
2 3 4 5
135