Skip to content

Commit c083e3c

Browse files
committed
docs: update include and exclude info
1 parent 786c180 commit c083e3c

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

docs/config.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ These options are specific to the Vite plugin itself.
9494

9595
- **Type:** `string | string[]`
9696

97-
A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files the plugin should operate on. By default, all svelte files are included.
97+
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.
9898

9999
### exclude
100100

101101
- **Type:** `string | string[]`
102102

103-
A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files to be ignored by the plugin. By default, no files are ignored.
103+
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.
104104

105105
### extensions
106106

@@ -161,13 +161,12 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns
161161
- **Type:** `boolean | string[]`
162162
- **Default:** `false`
163163

164-
vite-plugin-svelte automatically manages [pre-bundling for Svelte components](./faq.md#what-is-going-on-with-vite-and-pre-bundling-dependencies).
165-
To opt-out of this automatic behavior you can use
164+
`vite-plugin-svelte` automatically manages [pre-bundling for Svelte components](./faq.md#what-is-going-on-with-vite-and-pre-bundling-dependencies). To opt-out of this automatic behavior you can use:
166165

167166
- `disableDependencyReinclusion: true` to disable all re-inclusions
168167
- `disableDependencyReinclusion: ['foo']` to disable re-inclusions only for dependencies of `foo`.
169168

170-
If you want to manually re-include the dependency `bar`of `foo`, you can add `{optimizeDeps:{include:['foo > bar']}}` to your Vite config
169+
If you want to manually re-include the dependency `bar` of `foo`, you can add `{optimizeDeps:{include:['foo > bar']}}` to your Vite config
171170

172171
> This is currently required for hybrid packages like Routify, that export both Node and browser code.
173172

docs/faq.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ For reference, check out [windicss](https://github.com/windicss/vite-plugin-wind
9393

9494
### What is going on with Vite and `Pre-bundling dependencies:`?
9595

96-
Pre-bundling dependencies is an [optimization in Vite](https://vitejs.dev/guide/dep-pre-bundling.html).
97-
It is required for CJS dependencies, as Vite's development server only works with ES modules on the client side.
96+
Pre-bundling dependencies is an [optimization in Vite](https://vitejs.dev/guide/dep-pre-bundling.html). It is required for CJS dependencies, as Vite's development server only works with ES modules on the client side.
9897

9998
Thanks to [a new API in Vite](https://github.com/vitejs/vite/pull/4634), [vite-plugin-svelte](https://github.com/sveltejs/vite-plugin-svelte/pull/157) automatically handles pre-bundling these for you.
10099

packages/vite-plugin-svelte/src/utils/options.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,18 +323,18 @@ export interface Options {
323323
configFile?: string;
324324

325325
/**
326-
* A `minimatch` pattern, or array of patterns, which specifies the files the plugin should
326+
* A `picomatch` pattern, or array of patterns, which specifies the files the plugin should
327327
* operate on. By default, all svelte files are included.
328328
*
329-
* @see https://github.com/isaacs/minimatch
329+
* @see https://github.com/micromatch/picomatch
330330
*/
331331
include?: Arrayable<string>;
332332

333333
/**
334-
* A `minimatch` pattern, or array of patterns, which specifies the files to be ignored by the
334+
* A `picomatch` pattern, or array of patterns, which specifies the files to be ignored by the
335335
* plugin. By default, no files are ignored.
336336
*
337-
* @see https://github.com/isaacs/minimatch
337+
* @see https://github.com/micromatch/picomatch
338338
*/
339339
exclude?: Arrayable<string>;
340340

0 commit comments

Comments
 (0)