Skip to content

Commit

Permalink
docs: additional notes on globs and exclude (#773)
Browse files Browse the repository at this point in the history
Co-authored-by: 卢海宇 <haiyu.lu@lixinchuxing.com>
Co-authored-by: Anthony Fu <github@antfu.me>
  • Loading branch information
3 people committed Jun 25, 2024
1 parent 3a2555d commit ecfbff3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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[\\/]/],

Expand Down

0 comments on commit ecfbff3

Please sign in to comment.