Skip to main content

All Questions

Tagged with
0 votes
1 answer
63 views

css gets transitioned at first mount

I have a svelte app that mounts some progress dots into a pretty plain html site. simplified the ProgressDots.svelte has this: hello <div class="progress-dots"> <div class="...
munHunger's user avatar
  • 3,061
0 votes
1 answer
91 views

Serving .js and .css from Vite + Svelte to a static website

I have a pre-existing website using a popular website builder. I want to be able to inject interactive svelte components on certain blog pages to help demonstrate concepts. I got a rough prototype ...
learyjk's user avatar
  • 731
0 votes
2 answers
295 views

Issue with Dynamic Importing of Svelte Component in JavaScript with Svelte

I'm trying to dynamically import a Svelte component in my project, but I'm encountering a TypeError when including the file extension in the variable that holds the component name. Here is the working ...
sampa's user avatar
  • 639
0 votes
0 answers
135 views

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 ...
diaburobr's user avatar
1 vote
1 answer
92 views

Can't import image in build in Svelte

I have a SvelteKkit app, it has an upload image function that saves the image in $lib/images directory. const carDirectory = path.join('src', 'lib', 'images'); // Ensure the car's directory ...
parsa estakhry's user avatar
1 vote
0 answers
41 views

How to enable source map in server-side code of production server to make log more readable in Sveltekit

I am developing my application using SvelteKit 2.0 with the JavaScript language. On the development server, the source code appears to be enabled by default, enabling me to pinpoint the exact line ...
Chuck1sn's user avatar
1 vote
0 answers
133 views

Vite is trying to read svelte.config.js even thought Svelte settings are inside vite.config.js

Vite (or one of its plugins) is trying to read a svelte.config.js file that I've never used, even though my Svelte configuration is inside vite.config.js. ❯ bun dev $ vite --host Error reading svelte....
Chumpocomon's user avatar
0 votes
0 answers
84 views

Vite: error 500, SyntaxError: import not found: default

Sometimes, I get a really weird thing: I get an error 500 in sveltekit like: with, in the browser, an error: The next HMR update will cause the page to reload SyntaxError: import not found: default ...
tobiasBora's user avatar
  • 2,576
0 votes
0 answers
959 views

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 to: ...
mvioole's user avatar
  • 142
2 votes
1 answer
375 views

Pass docker environment-vars to vite(svelte) docker-compose stack

I am trying to get docker-compose to pass env vars to my svelte(kit) app running on vite development server. I'm packaging my web app as a Docker image like this: FROM node:18-alpine AS builder ...
DaFeist's user avatar
  • 31
1 vote
1 answer
245 views

JS Syntax Error after deploying to CloudFlare

I have a static website built using Svelte (4.2.10) + Vite (5.1.1) + TypeScript (5.2.2). When I run the developmental frontend by running vite locally, it runs fine and renders without any problem. ...
Hykilpikonna's user avatar
  • 2,171
0 votes
2 answers
3k views

How to include JS from node_modules in Vite in production?

I have a svelte project that uses Vite for its build tooling. I want to import a js file from the sakura-js package and call it in my index.html file. It works locally when I use the script tag like ...
LRitter's user avatar
  • 154
0 votes
1 answer
415 views

How can you handle 3 conflicting versions of the same library in a Vite project?

I have the following odd situation: I am developing a web app with Vite and the svelte-ts template setup. In this app, I have to use different libraries for WebXR based augmented reality, so you can ...
Furious Gamer's user avatar
2 votes
2 answers
1k views

SyntaxError when building SvelteKit: The requested module 'intl-messageformat' is a CommonJS module

I'm getting the following error when building for production. Here's the output of npm run build running on Node v16.20.1 npm run build > [email protected] build > vite build vite v4.4.9 ...
Luca's user avatar
  • 31
1 vote
1 answer
507 views

Svelte 4 Route Not Found After Refreshing the Page on Production Mode

I'm trying out a frontend framework Svelte 4 on my local machine using Ubuntu 20.04. I have a critical problem: when I run in development mode (npm run dev) and navigate to the route /quote/1, ...
Roby Firnando Yusuf's user avatar

15 30 50 per page