From b1fc08c6290a1093dddb0a169aae94dde028d78c Mon Sep 17 00:00:00 2001 From: dominikg Date: Tue, 3 Sep 2024 13:44:47 +0200 Subject: [PATCH 1/3] docs(vitePreprocess): change wording to show that script is no longer preprocessed by default --- docs/preprocess.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/preprocess.md b/docs/preprocess.md index a9c1e7de5..543087af9 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. From 82aab22040308fe36660630e137854b052c47ace Mon Sep 17 00:00:00 2001 From: dominikg Date: Tue, 3 Sep 2024 14:36:26 +0200 Subject: [PATCH 2/3] docs(vitePreprocess): more details around new script default --- docs/preprocess.md | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/docs/preprocess.md b/docs/preprocess.md index 543087af9..e40bba27f 100644 --- a/docs/preprocess.md +++ b/docs/preprocess.md @@ -20,16 +20,29 @@ However, `svelte-preprocess` does provide extra functionalities not available wi - SugarSS: `