-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(nuxt)!: only scan top level composables/
and support glob
#6025
Conversation
β Deploy Preview for nuxt3-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Seems a good defaults change to simplify scanning with top level only. Can you please:
|
Updated migration guide whilst @pi0 was reviewing. One thought: we should also update logic for other scanned directories, likely in same PR to reduce breaking change. |
surely we need to make scanned directories to a closer behavior. But let's keep changes splitted. @danielroe What other dirs are you thinking? |
Plugins currently have this |
Strict behavior of middleware/layouts makes sense. We can add option later without breaking changes. (breaking) Change for plugins makes sense with same next release ππΌ |
PR description: I would suggest to add top level |
Migration guide updated. Let me know if you have any other suggestion, or update it directly :) |
(upgraded mistakenly merged via previous #6032 PR). Latest edge release contains the changes via merge commit of this. |
dirs
and change scanning logiccomposables/
and only scan top level
composables/
and only scan top level composables/
and support glob
problem source: https://github.com/nuxt/framework/issues/6614 solve source: nuxt#6025
π Linked issue
unjs/unimport#86 (comment)
Unimport upgraded from 0.4.x to 0.6.x in #6032
β Type of change
π Description
This PR changes auto-imports' behavior to exclude nested folders from auto-imports.
To get auto imports for nested modules, you can re-export them from
composables/index.ts
(see alternative below)π Migration
composables/*/index.ts
is no longer being scanned and you need to reexport. In order to preserve previous behavior, please configureautoImports.dirs
:π Checklist