From ecfbff3cced6563026c9be8be88e8bb65b5d537b Mon Sep 17 00:00:00 2001 From: Kanade-Lu <48433677+Kanade-Lu@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:27:06 +0800 Subject: [PATCH] docs: additional notes on `globs` and `exclude` (#773) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 卢海宇 Co-authored-by: Anthony Fu --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 09f6df5b..298480f3 100644 --- a/README.md +++ b/README.md @@ -359,6 +359,7 @@ Components({ // Glob patterns to match file names to be detected as components. // When specified, the `dirs` and `extensions` options will be ignored. + // If you want to exclude components being registered, use negative globs with leading `!`. globs: ['src/components/*.{vue}'], // search for subdirectories @@ -396,7 +397,8 @@ Components({ // Allow for components to override other components with the same name allowOverrides: false, - // filters for transforming targets + // Filters for transforming targets (components to insert the auto import) + // Note these are NOT about including/excluding components registered - use `globs` for that include: [/\.vue$/, /\.vue\?vue/], exclude: [/[\\/]node_modules[\\/]/, /[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/],