Category "sveltekit"

SvelteKit and caching the component output in server-side rendering

I have a SvelteKit landing page component that calculates and displays statistics. Because crunching the numbers out from the database is a heavy job, and this

Sveltekit how do I set checkboxes checked based on query params?

I am trying to set checkboxes active based on query parameters using Sveltekit. To achieve this, I tried to get all route query parameters using the 'url.search

How do I deploy a sveltekit app to a dfinity container?

Difinity is a blockchain container. I need a rock solid example on how to deploy a standard sveltekit app to it. Their web page doesn’t cover sveltekit ht

How to use Tailwind Elements in Sveltekit

I'm trying to use a simple Tailwind date picker component in a svelte kit app, however the calendar popup is not appearing. I assume it has something to do with

static adapter not working with nginx and refreshing pages

This is my config: import adapter from '@sveltejs/adapter-static'; import preprocess from 'svelte-preprocess'; import path from 'path'; /** @type {import('@sve

Sveltekit communication between layout, routes and components

I'm trying to move a svelte SPA into Sveltekit. In my SPA, the communication schema is what I would call a "controller component" which takes care of displaying

Svelte/SvelteKit: Dynamic import of components with variable

I want to dynamically import components without importing a specific component. I want to set the component name with a variable, received from the store: <s

How to route programmatically in SvelteKit?

I want to be able manage history of my SvelteKit app while simultaneously making sure the whole routing system of SvelteKit doesn't get affected in any way. Som

Sveltekit Greensock Scrolltrigger breaking in production

I have a Green Sock animation that is working fine in development, but breaks in yarn run preview and production: ScrollTrigger-4a410f45.js:9 Uncaught (in promi

How to convert SvelteKit fetch response to a buffer?

I have a simple node script to fetch tif image, use sharp to convert the image to jpeg and generate data:image/jpeg;base64 src for browser. The reason is to ena

Is there a way to run prisma in the sveltekit load function?

I have a sveltekit app I'm working on and it includes Prisma, I have been trying to pass a posts Array to all of my routes via the __layout's load function. Thi

How to use an external backend with SvelteKit

I want to use SvelteKit with an external backend. Let's consider the backend is not in NodeJS, already done and running and that every bit of non-static data co

How to fetch data from endpoint in Sveltekit version v1.0.0-next.287

Yesterday I updated SvelteKit version from v1.0.0-next.241 to v1.0.0-next.287, and since I cannot fetch data in the component. I get an error message: Unexpecte

Sveltekit - How to access a "reactive context" (a store passed down via context) in the Script tag of Child Component?

I'm initialising a Class in the onMount function of a Parent Wrapper component and want to expose it to all the children. I'm currently using a writable store t