Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dir)!: support glob pattern in dirs #86

Merged
merged 1 commit into from
Jul 21, 2022
Merged

feat(dir)!: support glob pattern in dirs #86

merged 1 commit into from
Jul 21, 2022

Conversation

antfu
Copy link
Member

@antfu antfu commented Jul 6, 2022

@antfu antfu changed the title feat(dir): support glob pattern in dirs feat(dir)!: support glob pattern in dirs Jul 8, 2022
@antfu
Copy link
Member Author

antfu commented Jul 8, 2022

Discussion:

Not sure if we should include */index.{ts,js,mjs,cjs,mts,cts} by default, which make it less intuitive and make it complex to explain (https://v3.nuxtjs.org/guide/directory-structure/composables#how-files-are-scanned cc @danielroe)

I propose we remove the scanning for one level deep's index. Instead, with this PR, user could set

dirs: [
  'composables/*', // one level
  'composables/**', // all nested
  'composables/*/auto-imported', // more specific
]

to have nested auto scanning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

why auto import didn't support pattern like 'src/modules/xx/services'
1 participant