sveltejs / rollup-plugin-svelte

Compile Svelte components with Rollup
MIT License
505 stars 79 forks source link

Document how to use TypeScript #229

Open fregante opened 1 month ago

fregante commented 1 month ago

The page https://svelte.dev/docs/typescript#setup-other-build-tools points users to the root of this repo, which lacks any mention of TypeScript entirely.

It would be great to see how to configure the preprocessor to enable TS support

fregante commented 1 month ago

In my case all I needed was:

import { sveltePreprocess } from 'svelte-preprocess';

and

svelte({
    preprocess: sveltePreprocess()
})