svelte Questions
7
Solved
I know it probably uses @font-face but I dont know where to put my woff files localy to get Svelte to use a custom font. I dont know where to put the @font-face either. Thanks in advance!
1
I'm currently developing a desktop application using Tauri, SvelteKit, & Tailwind. When I run a dev build of my application I frequently get the following error:
[vite] Internal server error: ...
Kilmer asked 31/3, 2023 at 0:20
4
Solved
What is exact different between Svelte Context and Svelte Store?
When to use in different situation?
import { getContext } from 'svelte';
import { writable } from 'svelte/store';
6
Solved
I have a setup that integrates electron with svelte along with typescript support.
when I run the rollup script to compile svelte app, i am getting cannot find module ./App.svelte error as shown be...
Bertolde asked 4/10, 2020 at 12:25
3
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_F...
8
I'm migrating from Google Sign-in platform to the newer Google Identity Services library.
App.svelte:
<svelte:head>
<script src="https://accounts.google.com/gsi/client" async de...
Mat asked 31/3, 2022 at 3:18
4
Solved
I created two components:
1. btn.svelte
<button class="btn" />
2. btnHold.svelte
<script>
import Btn from './btn.svelte';
</script>
I'm trying to add a new class btn-...
Elizaelizabet asked 31/3, 2023 at 8:16
3
Solved
It could be that I'm typing the wrong things in Google and can't get a good answer.
Is there a "svelte recommended" way to store the value of a GET result, so that, on every refresh or li...
Eshelman asked 27/9, 2020 at 19:42
4
Solved
I'm trying to the /login?ref=/some/path parameter to redirect to after login:
const ref = $page.url.searchParams.get('ref') || '/dashboard';
However I get this error:
TypeError: Cannot read proper...
5
I'm interested in capturing the Internet Protocol (IP) address of my users at their initial submit to my website. I was under the impression that a SvelteKit submit would be similar to other node.j...
Siouxie asked 28/12, 2021 at 20:34
2
I've created a svelte project and wanted to use prettier. I have prettier svelte plugin.
pnpm exec prettier --write .
will only pick up js and html files.
pnpm exec prettier --write .src/routes/+p...
3
I have the following setup in my +page.server.js:
export const actions = {
createScore: async ({ request }) => {
const values = await request.formData();
try {
const instagram = values.get(...
Pyrope asked 27/3, 2023 at 14:35
2
Solved
What is the correct way (or differences if both are correct) for updating a $orderItems = writable([]) Svelte writable array store? We'll assume result is a new item I want to push at the end of $o...
Capitalize asked 25/5, 2022 at 14:59
3
Is it possible, in development env, to run SvelteKit app with https?
I tried to run
npm run dev -- --https
and vite starts the server successfully:
VITE v3.0.2 ready in 359 ms
➜ Local: https://...
3
Solved
I'm experimenting with svelte using it's template (https://github.com/sveltejs/template/) as starting point.
And I wanted to scan qr codes with https://github.com/nimiq/qr-scanner, but on my pc I d...
2
Solved
I have an app that simply hides content Hidden.svelte:
<script>
let shown = false;
function show() {
shown = true;
}
</script>
<svelte:options accessors={true}/>
{#if shown...
Peaslee asked 20/4, 2020 at 23:30
4
I am currently working with svelte to create a smooth auto slider using SwiperJs. It seems that I am unable to create that animation.
When loading the page, the autoPlay dosen't seem to work.
Below...
Blessing asked 29/8, 2022 at 5:26
5
So new to svelte but it is so small it is perfect for a job i am working on.
Went for the typescript option: https://svelte.dev/blog/svelte-and-typescript
How or where can i find the types for cust...
Weiner asked 27/9, 2020 at 11:8
1
Solved
I'd like to do some integration testing of my svelte + page.js-based router using vitest, but I'm running into an issue where the jsdom instance only updates correctly once per test file.
In the fo...
Expiate asked 27/11, 2022 at 11:33
4
It seems that Tailwind CSS IntelliSense is not working every time I start VScode , after reinstalling it works, on the other hand when it works Tailwind CSS IntelliSense is not suggesting unless I ...
Outstretch asked 6/1, 2022 at 4:56
3
Solved
am new to svelte and svelteKit in general and am trying to load data from api and I followed the sveltekit todo sample code. It's working well for initial rendering and a tag onClick but in div on:...
Elfland asked 20/8, 2022 at 14:49
5
Solved
I'm hoping to find a way to iterate over an #each block a set amount of times in Svelte 3. In Vue I would do something like this:
<li v-for="i in 3"><!-- somecontent --></l...
Cabinet asked 3/10, 2019 at 6:41
3
Problem
I have a REST API that has a login endpoint. The login endpoint accepts a username and password, the server responds by sending a HTTPOnly Cookie containing some payload (like JWT).
The app...
5
Solved
So I have a Svelte application with TypeScript enabled but now I am having an issue for running it :
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)...
Shandy asked 2/7, 2022 at 18:54
2
I want to insert in database some data. My database connector is using DrizzleORM in a file named db.ts
src/lib/server/db.ts
import { connect } from "@planetscale/database";
import { driz...
Bearnard asked 18/10, 2023 at 7:50
© 2022 - 2024 — McMap. All rights reserved.