Category "svelte"

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

How to make a cumulative filter system in svelte (like amazon sidebar)

I have a svelte page to show a list of post, I need to give the user the ability to filter that list by several conditions, eg: year, tags, category, etc. All t

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

How to style element content in Svelte?

<style> color: red; </style> Some html content! this code does not work. In the Angular framework it can be done by using the :host selector.

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

Build error after updating Svelte: Package subpath './compiler.js' is not defined by "exports"

Problem I was on Svelte version 3.0.0 and used npm i svelte@latest to update to the most recent version. Now I can't get the app to run, I always get this errro

Azure function accessible locally only

I have an Azure static web app with a svelte front end and azure server less functions for backend. When developing locally I can connect to the functions perfe

svelte on drop event not getting called

I know this has to be something blindingly obvious but I'm not getting it. I have two divs, one draggable and the other with an on:drop which doesn't seem to be

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

Svelte3 input validation

Yesterday I was trying to translate a problem I had to solve in React, to Svelte, and I can't figure it out. The problem is the following: I have 3 inputs each

404 Problem with Sapper on github pages using a custom domain

I have been trying to get my portfolio working on Github Pages with a custom domain, I have build everything with Sapper / Svelte. Locally everything works grea

Deploying Svelte App to Heroku / Dokku fails because modules cannot be found

I am having problems deploying my svelte web3 App to my VPS running Dokku. The structure of the folder is as follows: root |-->svelte |--> ... I found s

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

Why use a factory for a custom store vs. just exporting an object

I'm going through the Svelte tutorial and I'm on the custom store page (https://svelte.dev/tutorial/custom-stores). The sample code is written using a factory f

Is Svelte limited to single-page applications (SPA)?

The Svelte documentation states that: Svelte converts your app into ideal JavaScript at build time, rather than interpreting your application code at run time.

Why doesn't my website stop loading (Svelte)

I made a portfolio website, but this site doesn't stop loading. Sorce code is here. Does anyone have a solution? or the reason why this happens?

Svelte: Uncaught ReferenceError: exports is not defined

Background I am trying to use dgraph-js-http in a Svelte application. Error The initial error I was facing was: Uncaught ReferenceError: buffer is not defined

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

Svelte: Remount component to overwrite media elements

Context In my Svelte app, I have multiple pages, each showing one or multiple videos. For rendering the videos I reuse a video component (simplified): // video