Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Browsing all 1539 articles
Browse latest View live
↧

Handling Markdown File Content in Svelte and Adding a Copy Button

I'm working on a Svelte project where I need to load and render Markdown files that are organized in different directories. The Markdown files contain both metadata (like titles and descriptions) and...

View Article


Svelte: Hooks.js file is not getting recently created cookies

Someone knows why my hooks.js file not getting recently created cookiesWhen I do login with discord api in my svelte website, the cookies are created and the hooks only get it minutes after.Someone can...

View Article


Is there any way to call the component in same component in svelte

I have a problem in which I have scenario such that recursively same component I want to call in svelte component. They should work like parent and child such like recursively function call.I have...

View Article

Understanding Svelte final library size

EDIT (findings): I tried again after removing all references to Inertia, and only imported my example page in main.js (no other pages), and the result is the same: this example page component still...

View Article

Using $env with SvelteKit and Docker

SvelteKit provides a good and easy way to use ENV variables:https://learn.svelte.dev/tutorial/env-static-publicIm using Docker in a CI pipeline to create images. However when running RUN npm run build...

View Article


Build one-file script.js with SvelteKit packaging? [duplicate]

I've built packages using SvelteKit (docs) that I can use in other projects. The build folder typically consists of an index.js that exports a ComponentName.svelte. Then, in another project, I would...

View Article

Vite always building SSR for sveltekit static site regardless of setup

I cloned this site from a demo repo to try to get something to make sure that it's nothing with my setup.So fresh clone - you can see from this output, that it's still building the SSR bundle even...

View Article

Universal rendering skeleton Loading in sveltekit

I'm working on a SvelteKit project where I aim to achieve universal rendering. My goal is to have the first request be server-side rendered (SSR), and then switch to client-side rendering (CSR) for...

View Article


Image may be NSFW.
Clik here to view.

Why is Clicking a button intended to modify specific part of view in my...

ContextLanguage used : typescriptUI toolkit svelte and bootstrapIssue descriptionI'm currently writing a vscode extension with one of it's feature being that clicking a button update an HTML table...

View Article


Migrating a component with binded clientWidth and clientHeight from Svelte 4...

I'm migrating and app from Svelte 4 to Svelte 5 in order to prepare for future Svelte 5 release.One of the component class has a logic to place itself on a random position on the user's screen, using...

View Article

Disable certain a11y warnings globally in sveltekit

Sveltekit has very strict a11y checks, for instance you can't just add on:click to a div.I can suppress it on a per-line bases, e.g.:<!-- svelte-ignore a11y-click-events-have-key-events...

View Article

Error when evaluating SSR module even when SSR is disabled - svelte-kit

I wanted one of my route in my app not to be server side rendered.The way to do this will be doing export const ssr = false in module script or setting ssr: false in svelte.config.js as mention in...

View Article

Svelte TypeScript: Unexpected token when adding type to an event handler

I'm trying to implement TypeScript into Svelte and has a problem like this: when I try to add type to an event in beneath line:on:click={(e: Event) => onClick(e, data)}it yells about:Error:...

View Article


How to debounce / throttle with Svelte?

So i currently have:App.html<div><input on:input="debounce(handleInput, 300)"></div><script> import { debounce } from 'lodash' export default { data () { name: '' }, methods: {...

View Article

refresh svelte select component after adding an option

I am trying to make a select component update itself after adding an option but I can't. Here is my code: <script> const options = ['first_option'] const addEventSignal = () => { const option...

View Article


'Buffer' is not exported by __vite-browser-external:buffer

I'm getting this build error with vite and sveltekit using adapter-nodeI'm not sure why it won't build since it relies on node to server the client.dev works fine'Buffer' is not exported by...

View Article

Image may be NSFW.
Clik here to view.

How to Properly Read a Static File in SvelteKit Using a Server-Side Load...

I am working on a SvelteKit project where I want to dynamically render HTML content based on a route parameter (e.g., /2023, /2022). I have static HTML files (2012.html, 2013.html, etc.) stored in the...

View Article


SvelteKit Router Not Generating Routes After Build

I am currently working on a mini web app and trying to deploy it to a VM. Everything works fine via npm run dev, but routes do not work when running VS Code live server on the dist after npm run build...

View Article

Vite build stuck on 'modules transform'

While building a svelte application with vite, the build process gets stuck on 'modules transform'. No error is reported on the building logs.I've tried several things, including but not limited...

View Article

SCSS global style not applying correctly on custom error page in SvelteKit

I'm encountering an issue with my SvelteKit project where global styles defined in my SCSS files are not being applied correctly to my custom svelte error page. Interestingly, the styles seem to apply...

View Article
Browsing all 1539 articles
Browse latest View live