# sveltejs/svelte-preprocess

A ✨ magical ✨ Svelte preprocessor with sensible defaults and support for: PostCSS, SCSS, Less, Stylus, Coffeescript, TypeScript, Pug and much more.

Repository: https://github.com/sveltejs/svelte-preprocess
Canonical: https://ross.abutalabs.com/products/svelte-preprocess
Language: TypeScript
License: MIT
License Family: permissive
Topics: svelte, preprocess, sveltejs, sveltekit
Last push: 2026-05-25T06:45:42+00:00

## Health v2 (maintenance only)
Score: 88/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 84, release rhythm 85, longevity 100
- inputs: {"age_days": 3038, "days_push": 100, "days_rel": 100, "gap_med": 2, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1797, forks 152 (observed 2026-08-28T04:05:37.684746+00:00)

## What it is
svelte-preprocess is a Svelte preprocessor library that lets you write Svelte components in languages other than plain JavaScript, HTML, and CSS, such as TypeScript, SCSS, Less, Stylus, PostCSS, CoffeeScript, and Pug. It bundles multiple language preprocessors behind a single configuration with sensible defaults, typically wired up via a svelte.config.js file.

## Use cases
- use TypeScript in Svelte components
- write Svelte component styles in SCSS or Less
- use Pug templates in Svelte files
- configure multiple Svelte preprocessors with one package
- add PostCSS support to a Svelte project
- preprocess CoffeeScript in Svelte script tags

## When to choose
- you use Svelte with languages beyond JS/HTML/CSS and are not on Vite with vite-plugin-svelte
- you need a single preprocessor covering TypeScript, SCSS, Less, Stylus, Pug, and more
- you are on Svelte 4 or an older setup without native TypeScript handling

## When to avoid
- you use Svelte 5 and only need type-only TypeScript features, which Svelte handles natively
- you use Vite, where vite-plugin-svelte's built-in preprocessor covers TypeScript and common CSS preprocessors
- you only write plain JavaScript, HTML, and CSS in Svelte components

## Facets
- artifact type: library
- maturity: maintenance
- function: build-tool, templating, css-framework
- domain: web-development, frontend, developer-tools
- platform: -
- tags: svelte, preprocessor, typescript, scss, postcss, pug, less, stylus, coffeescript, sveltekit, nodejs, javascript

## Member repositories
- sveltejs/svelte-preprocess (main) score 88

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:37.684746+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:22:46.895299+00:00, confidence not recorded.
  - readme: https://github.com/sveltejs/svelte-preprocess (fetched 2026-08-28T04:05:37.684746+00:00, sha 7d54fd9bebe8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
