SvelteKit local development with CLI is not loading CSS
Open
Nobody has claimed this yet.
area: frameworks
type: bug
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 474
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 53
Description
Describe the bug
When running ntl dev locally in a SvelteKit application, the CSS bundle 404s and does not apply any CSS to the application. (See screenshot)

Steps to reproduce
- Have a SvelteKit app locally or create a new sveltekit app
npm create svelteand follow prompts to install deps.
a. Choose demo app from CLI if creating a new app to see CSS applied - Run
ntl dev, port should open to localhost://8888, but no CSS is applied.
Configuration
[build]
command = "vite build"
functions = "netlify/functions"
publish = "build"
Environment
System:
OS: Linux 5.10 Ubuntu 20.04 LTS (Focal Fossa)
CPU: (16) x64 Intel(R) Core(TM) i7-10700KF CPU @ 3.80GHz
Memory: 12.97 GB / 15.57 GB
Container: Yes
Shell: 5.0.16 - /bin/bash
Binaries:
Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
npmGlobalPackages:
netlify-cli: 11.8.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with a demo SvelteKit application created by npm and run ntl dev using the shown configuration. Inspect the CSS request that returns 404 and the CLI's local development serving path; done means the app loads its CSS bundle at localhost:8888.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vite
- Domain
- cli, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100