8000 docs: additional notes on `globs` and `exclude` (#773) · unplugin/unplugin-vue-components@ecfbff3 · GitHub
[go: up one dir, main page]

Skip to content

Commit ecfbff3

Browse files
Kanade-Lu卢海宇antfu
authored
docs: additional notes on globs and exclude (#773)
Co-authored-by: 卢海宇 <haiyu.lu@lixinchuxing.com> Co-authored-by: Anthony Fu <github@antfu.me>
1 parent 3a2555d commit ecfbff3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ Components({
359359

360360
// Glob patterns to match file names to be detected as components.
361361
// When specified, the `dirs` and `extensions` options will be ignored.
362+
// If you want to exclude components being registered, use negative globs with leading `!`.
362363
globs: ['src/components/*.{vue}'],
363364

364365
// search for subdirectories
@@ -396,7 +397,8 @@ Components({
396397
// Allow for components to override other components with the same name
397398
allowOverrides: false,
398399

399-
// filters for transforming targets
400+
// Filters for transforming targets (components to insert the auto import)
401+
// Note these are NOT about including/excluding components registered - use `globs` for that
400402
include: [/\.vue$/, /\.vue\?vue/],
401403
exclude: [/[\\/]node_modules[\\/]/, /[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/],
402404

0 commit comments

Comments
 (0)
0