Skip to content

Commit 390dec3

Browse files
committed
add missing options, improve language
1 parent b27e2f2 commit 390dec3

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

docs/config.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ A basic Svelte config looks like this:
4444
```js
4545
// svelte.config.js
4646
export default {
47-
// svelte options
47+
// Svelte options
4848
extensions: ['.svelte'],
4949
compilerOptions: {},
5050
preprocess: [],
@@ -60,7 +60,7 @@ export default {
6060

6161
### Config file extension
6262

63-
The content of svelte config should always be in esm syntax. Depending on Node's mode, make sure you're using the correct extension.
63+
The content of Svelte config should always be in esm syntax. Depending on Node's mode, make sure you're using the correct extension.
6464

6565
- If `type: "module"` is defined in `package.json`, prefer `.js` or `.ts`
6666
- If `type: "module"` is not defined, use `.mjs` or `.mts`
@@ -77,7 +77,7 @@ export default defineConfig({
7777
plugins: [
7878
svelte({
7979
configFile: false
80-
// your svelte config here
80+
// your Svelte config here
8181
})
8282
]
8383
});
@@ -158,12 +158,14 @@ These options are specific to the Vite plugin itself.
158158
### include
159159

160160
- **Type:** `string | string[]`
161+
- **Default:** unset
161162

162-
A [picomatch pattern](https://github.com/micromatch/picomatch), or array of patterns, which specifies the files the plugin should operate on. By default, all svelte files are included.
163+
A [picomatch pattern](https://github.com/micromatch/picomatch), or array of patterns, which specifies the files the plugin should operate on **in addition** to the files ending with one of the configured extensions.
163164

164165
### exclude
165166

166167
- **Type:** `string | string[]`
168+
- **Default:** unset
167169

168170
A [picomatch pattern](https://github.com/micromatch/picomatch), or array of patterns, which specifies the files to be ignored by the plugin. By default, no files are ignored.
169171

@@ -216,7 +218,7 @@ A [picomatch pattern](https://github.com/micromatch/picomatch), or array of patt
216218
- **Type:** `InspectorOptions | boolean`
217219
- **Default:** `unset` for dev, always `false` for build
218220

219-
Set to `true` or options object to enable svelte inspector during development. See the [inspector docs](./inspector.md) for the full configuration options.
221+
Set to `true` or options object to enable Svelte inspector during development. See the [inspector docs](./inspector.md) for the full configuration options.
220222

221223
Inspector mode shows you the file location where the element under cursor is defined and you can click to quickly open your code editor at this location.
222224

@@ -309,7 +311,7 @@ export default {
309311
normalizedFilename: string;
310312
timestamp: number;
311313
warnings: Warning[]; // allWarnings filtered by warnings where onwarn did not call the default handler
312-
allWarnings: Warning[]; // includes warnings filtered by onwarn and our extra vite plugin svelte warnings
314+
allWarnings: Warning[]; // includes warnings filtered by onwarn and our extra vite-plugin-svelte warnings
313315
rawWarnings: Warning[]; // raw compiler output
314316
};
315317
```
@@ -319,4 +321,18 @@ export default {
319321
- **Type** `boolean`
320322
- **Default:** `false`
321323

322-
disable svelte resolve warnings. Note: this is highly discouraged and you should instead fix these packages which will break in the future.
324+
disable Svelte resolve warnings. Note: this is highly discouraged and you should instead fix these packages which will break in the future.
325+
326+
### disableApiSveltePreprocessWarnings
327+
328+
- **Type** `boolean`
329+
- **Default:** `false`
330+
331+
disable api.sveltePreprocess deprecation warnings
332+
333+
### compileModule
334+
335+
- **Type** `CompileModuleOptions`
336+
- **Default:** `undefined`
337+
338+
set custom compile options for compilation Svelte modules (`.svelte.js` files).

0 commit comments

Comments
 (0)