summaryrefslogtreecommitdiff
path: root/packages/integrations/svelte/README.md
diff options
context:
space:
mode:
authorGravatar Hippo <6137925+hippotastic@users.noreply.github.com> 2023-07-01 16:34:49 +0200
committerGravatar GitHub <noreply@github.com> 2023-07-01 16:34:49 +0200
commitbc9ce779d3c02e7a960a8a79ce2610a96b2afcb7 (patch)
treeca98857efd8c7e26786d45d21fa220f89646f128 /packages/integrations/svelte/README.md
parent0251e4e6cf512967e2421c2389aafef17fb89b79 (diff)
downloadastro-bc9ce779d3c02e7a960a8a79ce2610a96b2afcb7.tar.gz
astro-bc9ce779d3c02e7a960a8a79ce2610a96b2afcb7.tar.zst
astro-bc9ce779d3c02e7a960a8a79ce2610a96b2afcb7.zip
Move code block titles into comments to match docs (#7543)
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
Diffstat (limited to '')
-rw-r--r--packages/integrations/svelte/README.md14
1 files changed, 5 insertions, 9 deletions
diff --git a/packages/integrations/svelte/README.md b/packages/integrations/svelte/README.md
index 70e14ebb8..d36450526 100644
--- a/packages/integrations/svelte/README.md
+++ b/packages/integrations/svelte/README.md
@@ -42,9 +42,8 @@ npm install svelte
Now, apply this integration to your `astro.config.*` file using the `integrations` property:
-**`astro.config.mjs`**
-
-```js ins={2} "svelte()"
+```js ins={3} "svelte()"
+// astro.config.mjs
import { defineConfig } from 'astro/config';
import svelte from '@astrojs/svelte';
@@ -97,9 +96,8 @@ Providing your own `preprocess` options **will** override the [`vitePreprocess()
You can set options either by passing them to the `svelte` integration in `astro.config.mjs` or in `svelte.config.js`. Either of these would override the default `preprocess` setting:
-**`astro.config.mjs`**
-
```js
+// astro.config.mjs
import { defineConfig } from 'astro/config';
import svelte from '@astrojs/svelte';
@@ -108,9 +106,8 @@ export default defineConfig({
});
```
-**`svelte.config.js`**
-
```js
+// svelte.config.js
export default {
preprocess: [],
};
@@ -122,9 +119,8 @@ export default {
If you're using a preprocessor like TypeScript or SCSS in your Svelte files, you can create a `svelte.config.js` file so that the Svelte IDE extension can correctly parse the Svelte files.
-**`svelte.config.js`**
-
```js
+// svelte.config.js
import { vitePreprocess } from '@astrojs/svelte';
export default {