Uh oh!
There was an error while loading. Please reload this page.
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. |
pi0
commented
Jul 21, 2022
Seems a good defaults change to simplify scanning with top level only. Can you please:
|
danielroe
commented
Jul 21, 2022
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? |
danielroe
commented
Jul 21, 2022
Plugins currently have this |
pi0
commented
Jul 21, 2022
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 👍🏼 |
pi0
commented
Jul 21, 2022
PR description: I would suggest to add top level |
antfu
commented
Jul 21, 2022
Migration guide updated. Let me know if you have any other suggestion, or update it directly :) |
pi0
commented
Jul 21, 2022
(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 globproblem 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.tsis no longer being scanned and you need to reexport. In order to preserve previous behavior, please configureautoImports.dirs:📝 Checklist