Skip to content

Commit

Permalink
docs: when to use svelte-preprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm authored Jan 13, 2025
1 parent c522b8e commit 44dd999
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ const config = {
export default config;
```

## When to use it?

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:

- 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
- 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

If these cases don't apply to you, use `svelte-preprocess`.

## Features

### Template tag
Expand Down

0 comments on commit 44dd999

Please sign in to comment.