https://github.com/maxlath/vite-plugin-svelte-demo
https://github.com/maxlath/vite-plugin-svelte-demo
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/maxlath/vite-plugin-svelte-demo
- Owner: maxlath
- Created: 2025-07-09T12:53:04.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-09T13:26:38.000Z (about 1 year ago)
- Last Synced: 2025-10-04T13:53:06.336Z (10 months ago)
- Language: HTML
- Size: 1000 Bytes
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Demo for https://github.com/sveltejs/vite-plugin-svelte/pull/1166
## Reproduce the issue
```sh
git clone https://github.com/maxlath/vite-plugin-svelte-demo
cd vite-plugin-svelte-demo
pnpm install
pnpm start
```
and in another terminal
```sh
curl http://localhost:5173/
```
results in the following error in the vite logs:
```
2:55:26 PM [vite] (client) Pre-transform error: :5:2 Expected a valid CSS identifier
https://svelte.dev/e/css_expected_identifier
- Did you forget to add a lang attribute to your style tag?
- Did you forget to add a style preprocessor? See https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/preprocess.md for more information.
- Did you forget to add a scss preprocessor? See https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/preprocess.md for more information.
Plugin: vite-plugin-svelte
File: /tmp/bla/vite-plugin-svelte-demo/src/App.svelte:5:2
3 |
4 |
5 | $some-color: red;
^
6 | .h1{
7 | color: $some-color;
```
Note the **"Did you forget to add a lang attribute to your style tag?"** message, despite having `<style lang="scss">`