Skip to content

Commit 44dd999

Browse files
authored
docs: when to use svelte-preprocess
1 parent c522b8e commit 44dd999

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ const config = {
5050
export default config;
5151
```
5252

53+
## When to use it?
54+
55+
Historically, `svelte-preprocess` was the go-to option whenever you had a language other than JS/HTML/CSS used inside your Svelte files. Today, depending on your setup, you may no longer need it:
56+
57+
- If you're using Svelte 5 and are only using type features of TypeScript (i.e. things that just "go away" after transpiling to JS), you don't need any preprocessor, Svelte handles this natively
58+
- If you're using Vite and are using TypeScript or common CSS preprocessors (PostCSS, SCSS, Less, ...), use the preprocessor that comes with vite-plugin-svelte instead
59+
60+
If these cases don't apply to you, use `svelte-preprocess`.
61+
5362
## Features
5463

5564
### Template tag

0 commit comments

Comments
 (0)