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

How can I create a route alias in solidstart's file routing and keep layout?

I'm trying to wrap my head around how to best do nested layouting using SolidStart's file based routing. I have an old app with a "route alias" from "/" to "/some/nested/page/with/layouts". I'm trying...

View Article


Image may be NSFW.
Clik here to view.

Height 100% not working on flex-box>flex-1? [duplicate]

I have a problem with making my element filling the height of flex-box children. As you can see in the image, h-full of Tailwind is not working (width x 0), when the parents, is having a good height of...

View Article


SvelteKitError: Not found: /undefined/get-paginated in Docker Container

I am encountering an issue with loading environment variable in my SvelteKit application when running it inside a Docker container. This question is extended from this questionThe error I'm seeing...

View Article

$lib imports in vanilla javascript with svelte / sveltekit

Is there any way to make statements like this work in vanilla javascript w/ svelte/sveltekit? I'm not using typescript. VS Code as my IDE.import { googleAuth, auth } from '$lib/server/auth'The...

View Article

Having a hard time understanding reactivity in a Svelte array for SuperForms

I have the following form in SuperForms: const { form } = superForm<CreateJobSchema>(data, { validators: typeboxClient(CREATE_JOB_SCHEMA), onError: (error) => { console.error(error)...

View Article


Image may be NSFW.
Clik here to view.

Shallow Routing throws 404 when typing address directly or reloading item...

Shallow routing works well when clicking on an itemShallow routing throws 404 when typing item url directlyLink to Stackblitz that shows the issuesrc/routes/(news)/+layout.svelte<script...

View Article

Cannot create Sveltekit app - ERR_TTY_INIT_FAILED uv_tty_init returned EBADF...

When I run the recommended $ npm create svelte@latest myapp, I get the following error: Welcome to SvelteKit!node:internal/errors:490 ErrorCaptureStackTrace(err); ^SystemError [ERR_TTY_INIT_FAILED]:...

View Article

sveltekit: how do I run startup/init code before anything else

The env:sveltekit 1.20.4svelte 4.0.5viteadapter-nodeHow do I run startup code, before the server starts handling requests?I need to start multiple services before a single request is handled, and for...

View Article


Is it possible to know the redirect origin when server-side redirecting to...

I hate two routes in my SvelteKit app, /a and /b. The first route can conditionally redirect to the second when loading:// src/routes/a/+page.server.tsexport async function load({ url }) { // some...

View Article


Shallow Routing breaks after page reload with SSR

New to svelte/sveltekit. I am trying to make a master detail layout work (side by side on desktop and separate pages on mobile)When testing shallow routing on the desktop, I click on items one after...

View Article

Sveltekit isn't respecting the ssr = false setting?

I'm just starting with sveltekit so this is probably something I'm doing wrong, but I have a very basic page based on the SplitPane example in Svelte...

View Article

Dynamically loading fonts only when called/is in use in quill js

Currently I want to be able to load google fonts in quill while in svelte. My problem is that I don't want them to be always loaded so that the website isnt bogged down by a stylesheet that has to...

View Article

Bind to imported $state in svelte5 (error "constant_binding")

// states.svelte.jsexport let name = $state("John"); // a state to be shared by multiple components<!-- Component.svelte --><script> import { name } from...

View Article


Image may be NSFW.
Clik here to view.

img tag is working locally but not in preview environment in Svelte [duplicate]

First time using Svelte and I'm just using a simple img tag seen below:<img src="src/lib/assets/todo_list.png" alt="todo list"/>When I run npm run dev, it shows up locally fine in browser. When I...

View Article

How to properly address Images and assets in sveltekit

i am totaly newbi in sveltekit,my main question is : Where to put images with SvelteKit? and how use it.in static folder, right?But this causes a problem:when in this route : "@domain/dashboard" ,I use...

View Article


Image may be NSFW.
Clik here to view.

hydration_mismatch on Svelte app when head and body are empty

I'm getting a hydration_mismatch issue on my Svelte app even when the body and head are completely empty. I attempted to narrow down when the warning occurs but it only seems to go away when both my...

View Article

How do I use tailwindcss @apply directive inside a svelte component

This works:<div class="list p-2" />This doesn't work:<style lang="postcss"> @tailwind base; @tailwind components; @tailwind utilities; @layer components { .list { @apply p-2; }...

View Article


Destructure and don't destructure variable at the same time in svelte

I was wondering if it's possible to have access to entire object inside if/for, but still be able to destructure individual props{#if object_var} {const {prop_var} = object_var}. <- doesn't work,...

View Article

Memorize Svelte Components Across Parents

I'm implementing a view layer for a markdown editor in svelte 5.I've already created an incremental parser that parses markdown to MDAst.MDAst parse a markdown source file as a hierarchy of...

View Article
Browsing all 1539 articles
Browse latest View live


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