Support import.meta.glob
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 11.2k
- Forks
- 899
- Avg merge
- 2d 24m
- Merged PRs (30d)
- 40
Description
Describe the feature
Following https://github.com/nuxt/nuxt/issues/22106, I would like to have import.meta.glob("./migrations/*.ts") available in Nitro apps, in particular in Nuxt server handlers.
As I elaborated in #1670, this should be lazy by default, repeating how Vite works. An option to pass { eager: true }(same as in Vite) would be nice but not critical, as this could be achieved in user-land.
Additional information
- Would you be willing to help implement this feature?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked Nuxt issue #22106 and issue #1670, then compare Vite's import.meta.glob behavior and lazy default with Nitro's handling of server handlers. The work is done when Nitro apps can use the requested migration glob and the eager option is either supported or explicitly scoped out.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vite
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100