556 questions with no answers
0
votes
0
answers
40
views
Sass + PurgeCSS + SvelteKit: properly hash filenames
I have some code using SvelteKit for JS, Sass (with Bootstrap) for CSS, optimized with PurgeCSS, and compiled with Vite.
Here my vite.config.js:
import { sveltekit } from '@sveltejs/kit/vite';
import {...
1
vote
0
answers
73
views
How to reactively respond to form.success updates from +page.server.ts actions in +pages.svelte
I have a SvelteKit setup where I perform a fetch request inside an action in +page.server.ts. Specifically, I define an addSender action that handles a POST request to an external API and returns an ...
0
votes
0
answers
20
views
Svelvet edge source is undefined
<script>
import { Svelvet, Node, Edge } from 'svelvet';
// Make these reactive by declaring them with let
// let nodes = [
// {
// id: 'start',
// position: { x: 100, y: ...
0
votes
0
answers
50
views
svelte-clerk library sign-up user does not recieve verification code
It works normal as it should when a user signs up via Google or Facebook, but when it's just email the user gets redirected to /sign-up/verify-email-address, which I have not set up and the user does ...
1
vote
0
answers
101
views
Mocking components on the server side when running tests on a SvelteKit API using Vitest
I'm developing a SvelteKit application and I try to use Vitest to run some tests.
I want to test a simple API endpoint:
// src/routes/api/test/+server.ts
import { testService } from '$lib/server/...
0
votes
0
answers
23
views
Getting Configuration Error in Sveltekith AuthJS for Provider Credentials
trying to implement AuthJS in Sveltekit with Twitch Provider and Credentials Provider. Twitch Provider is working.
But in Credentials where I want that the User can register with email username and ...
0
votes
0
answers
102
views
Returning an array from server-side to client-side in Svelte 5
I am using Svelte5. When I send an array from +page.server.js to +page.svelte it always works server-side and the array is sent as expected. However when +page.svelte is running on the client side ...
0
votes
0
answers
135
views
Login is possible but my supabase user / session is not "authenticated", GoTrueClient getSession() session from storage null
The stack: SvelteKit / Supabase (with docker)
To authenticate the users i followed the supabase tutorial (so my code strictly follows that). It works as i receive the user's data (profile, session...)....
1
vote
0
answers
62
views
How to properly wrap a WebComponent in Svelte(kit) 5
I need to use some WebComponents at $JOB inside SvelteKit, built as a SPA.
Supposing that <my-web-component> has:
API attributes (like disabled, but custom ones)
Methods
Events
What could be ...
0
votes
0
answers
33
views
Foreign Key table data is being placed in in separate rows instead of adjacent rows (SvelteKit and Supabase)
I need the lawfirmname data (the one that enters the lawyerscontactprofiles, products, and websites) table adjacent to any other data has been inserted at the same time.
For example, if I import a csv ...
0
votes
0
answers
180
views
Error Hosting Svelte SPA from ASP.NET Core App in IIS: Uncaught (in promise) Error: https://svelte.dev/e/lifecycle_outside_component
I am getting an error when trying to run a Svelte 5 (with SvelteKit) application as a SPA hosted by an ASP.NET Core application in IIS.
I am building the app using astatic adapter with a fallback file ...
1
vote
0
answers
69
views
Unable to find Svelte type definitions
Whenever I create a SvelteKit project using
npx sv create my-app
there are apparently no Typescript definitions which causes VS Code to underline pretty much my entire code in red. e.g.:
I am just ...
0
votes
0
answers
114
views
$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 ...
0
votes
0
answers
28
views
Click on any item from page 2 onwards and it immediately jumps to the top of the list. How to conditionally retain scroll positions?
How to reproduce
View the page with enough width (say a desktop) where list and detail are shown side by side
Click show more, go to page 2 or 3 or any other page than 1
Click on any item
Boom, we ...
0
votes
0
answers
125
views
Using supabase storage works with JPG but not with SVG for my website
I use Sveltekit and supabase to store my assets for my website. I use the public URL to load files which works fine for JPGs, but when I try to load SVGs the page shows a broken link.
If I manually ...
3
votes
0
answers
131
views
How to compile a single .svelte file from a SvelteKit app as a web component?
I have a SvelteKit 2/Svelte 5 app with out-of-the-box configuration - what you get by running npx sv create my-app. I want to build my app normally with adapter-node, but I also want to build a single ...
0
votes
0
answers
178
views
How to persist a transition between page navigations in SvelteKit
I'm trying to smoothly close an overlay with svelte transition when a page navigation occurs with Svelte 5 and SvelteKit.
It works perfectly when the overlay is in the component that does not change, ...
1
vote
0
answers
165
views
Daisy UI custom theme is not applying with SvelteKit
Here is my tailwind.config.ts file configuration. The problem is Tailwind CSS classes are working but when I am using custom theme colors of Daisy UI it's not working. Project is built on Tauri with ...
0
votes
0
answers
62
views
Integrating SvelteKit App as a WordPress Plugin
Background
I'm developing a WordPress plugin that provides a search functionality for content within the WordPress ecosystem.
My initial approach involved a separate SvelteKit frontend, communicating ...
0
votes
0
answers
73
views
Creating a subscribed contact in Resend creates an unsubscribed contact
This is the code I get from the documentation at https://resend.com/docs/dashboard/audiences/contacts:
import { Resend } from 'resend';
const resend = new Resend('re_123456789');
resend.contacts....
0
votes
0
answers
66
views
Sveltekit | Capacitor | Android Studio - Geolocation is populating in VS Code's Live Server & with "npm run dev" in terminal but not in Android Studio
I'm building a mobile app for android using Sveltekit and Capacitor. I basically followed a simple tutorial to create an app where you retrieve your Lat and Long after clicking a button. When I use VS ...
0
votes
0
answers
70
views
Init database connection at server server start with sveltekit
I am trying to create an all-in-one tool to monitor my different apps. I decided to do it in sveltekit because I am used to using it but only in frontend. This is the first time I use it to do the ...
1
vote
0
answers
142
views
How do I generate sourcemaps with Svelte and the adapter-static?
I have the following...
//vite.config.js
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [sveltekit()],
build: {
...
0
votes
0
answers
25
views
How do I make a site work with a URL like localhost:5173/index.html?
Using the new static adapter and hash based routing.
Works - localhost:5173
Doesn't work - localhost:5173/index.html
The site goes into reload recursion on load and crashes.
Reason I'm asking is, I ...
0
votes
0
answers
51
views
How to import a svelte.ts component from another app where the import is with $lib
Hi im trying to import a svelte component from another svelte.ts app. This component has a script:
button.svelte:
<script lang="ts">
import { cn } from "$lib/utils.js";
...