- 
                Notifications
    You must be signed in to change notification settings 
- Fork 99
Description
currently nuxi is a single executable that inlines all its dependencies. this is great. makes a difference in speed when initialising a new app. (it also opens the door to future auto-updating of nuxi, etc.)
but there are also some problems.
- performance: when added as a dependency of nuxt, which is the main use case fornuxi, this is totally duplicated content asnuxishares its dependency set with nuxt
- security: bug fixes in nuxi's dependencies require a new release in nuxi, and in some cases several releases. for example, a bug fix inlib-amight require a new release oflib-b(if it's inlininglib-aas well) and thennuxiwould have to bump both dependencies and rerelease
I would like to experiment getting the best of both worlds, by reducing nuxi scope so it is smaller and leaner for the key features it needs, and creating an additional package that does not inline dependencies, which will be used within nuxt
here's the proposed strategy:
### Tasks
- [x] release `@nuxt/cli` v3 without inlined deps
- [ ] defer to `@nuxt/cli` for subcommands in `nuxi`
- [ ] (experimentally) drop subcommand dependencies from `nuxi`
the last point would entail dropping subcommand dependencies from nuxi that rely on an installed nuxt instance, so e.g. dev command could call the @nuxt/cli installed within the nuxt project, much as we already load kit from that project
this would leave nuxi as a hyper-minimal cli for initialising a project, with its dependencies still inlined, but the nuxi binary that most users would end up using in their project would in fact be provided by @nuxt/cli with the corresponding benefits.
note:
- users might have manually installed nuxi- they won't benefit from the reduced disk space usage, but there will be no breakage
- nuxiand- @nuxt/cliversions might be different so it will be important for (as much as possible)- nuxito defer to the installed- @nuxt/clifor parsing args, etc.
I would welcome feedback from the team + community, in identifying possible issues and figuring out possible solutions for any unforeseen ones.