diff --git a/docs/preprocess.md b/docs/preprocess.md index a9c1e7de5..e4aa014c3 100644 --- a/docs/preprocess.md +++ b/docs/preprocess.md @@ -2,14 +2,14 @@ `vite-plugin-svelte` also exports Vite preprocessors to preprocess Svelte components using Vite's built-in transformers. -Compared to [`svelte-preprocess`](https://github.com/sveltejs/svelte-preprocess), Vite preprocessors share the same CSS configuration from the Vite config so you don't have to configure them twice. [`esbuild`](http://esbuild.github.io) is also used to transform TypeScript by default. +Compared to [`svelte-preprocess`](https://github.com/sveltejs/svelte-preprocess), Vite preprocessors share the same CSS configuration from the Vite config so you don't have to configure them twice. [`esbuild`](http://esbuild.github.io) can also be used to transform TypeScript. However, `svelte-preprocess` does provide extra functionalities not available with Vite preprocessors, such as [template tag](https://github.com/sveltejs/svelte-preprocess#template-tag), [external files](https://github.com/sveltejs/svelte-preprocess#external-files), and [global styles](https://github.com/sveltejs/svelte-preprocess#global-style) ([though it's recommended to use import instead](./faq.md#where-should-i-put-my-global-styles)). If those features are required, you can still use `svelte-preprocess`, but make sure to turn off it's script and style preprocessing options. ## vitePreprocess - **Type:** `{ script?: boolean, style?: boolean | InlineConfig | ResolvedConfig }` -- **Default:** `{ script: true, style: true }` +- **Default:** `{ script: false, style: true }` A Svelte preprocessor that supports transforming TypeScript, PostCSS, SCSS, Less, Stylus, and SugarSS. These are transformed when the script or style tags have the respective `lang` attribute. @@ -20,16 +20,29 @@ However, `svelte-preprocess` does provide extra functionalities not available wi - SugarSS: `