Category "sveltekit"

rollup run dev aborts

I'm working in a Svelte project with rollup. After working for a while, when I try to restart de project in production to see the changes and I write 'npm run d

How to handle sessions securely in SvelteKit

I'm fairly new to SvelteKit and I'm wondering how to properly handle sessions. From what I understand a unique session ID is typically stored in the browser as

SvelteKit - Deployment - @sveltejs/adapter-static not updating static paths in fallback page

I'm exploring SvelteKit for the first time, I built my simple first application and I'd like to deploy it to my Apache server as a static page As far as I under

Styling issues in monorepo with Turborepo, SvelteKit and Tailwind

I’ve created a monorepo with Turborepo that contains 2 SvelteKit apps and 2 packages: a component library (which is also based on SvelteKit) and a configu

SvelteKit API requests with Axios JWT authentication

I am creating an app with a SvelteKit client and a Laravel API stack, but I am struggling to safely authenticate my client to my API. Ideally I want to store a

Svelte reactive statement with a variable fron onMount

I'm trying to style the currently active tab of my web project with the class "active". To target my tab elements I am using onMount(() => { const li

How to use dotenv in SvelteKit project?

I'm trying to use dotenv.config() in a SvelteKit project. I can run npm run build successfully. But when I try to start the server (using node build), it throws

Svelte - Not able to fetch data from JSON file during jest unit testing

During unit testing, I am getting undefined error, while executing svelte component with json file. Restaurant.svelte : import data from '../Data/restaurants.js

SvelteKit could not resolve dependency even though it's external

I'm making a user authentication page and in that matter, I'm using bcrypt for hashing. Everything was nice and well until I actually use the bcrypt module in t

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