-
Notifications
You must be signed in to change notification settings - Fork 77
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
lighter @nuxt/cli
for use as direct dependency of nuxt
#648
Comments
nuxi
for use as direct dependency of nuxt
@nuxt/cli
for use as direct dependency of nuxt
I am using this
to be clear: I have to change it to |
@fabianwohlfart Yes. Or you can continue to import from |
No I don't. Thought it comes with Nuxt anyways, so I never added it separately. |
Even if it's a current dependency of nuxt, you should not rely on implicit dependencies. |
To init a New app why not reuse the create-nuxt / create-nuxt-app package ? Except devtools subcommand which nstall devtools globaly (not a good idea in my opinion) all nuxi command are contextual to a project so why it's not directly handler by nuxt ? What is the current benefit of a global nuxi binary ? Should https://github.com/nuxt/create-nuxt-app be archived ? |
Oh ! 😊 So the current vision of the future would be :
? |
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 ofnuxi
, etc.)but there are also some problems.
nuxt
, which is the main use case fornuxi
, this is totally duplicated content asnuxi
shares its dependency set with nuxtnuxi
, and in some cases several releases. for example, a bug fix inlib-a
might require a new release oflib-b
(if it's inlininglib-a
as well) and thennuxi
would have to bump both dependencies and rereleaseI 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 withinnuxt
here's the proposed strategy:
Tasks
the last point would entail dropping subcommand dependencies from
nuxi
that rely on an installednuxt
instance, so e.g.dev
command could call the@nuxt/cli
installed within thenuxt
project, much as we already load kit from that projectthis 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:
nuxi
- they won't benefit from the reduced disk space usage, but there will be no breakagenuxi
and@nuxt/cli
versions might be different so it will be important for (as much as possible)nuxi
to defer to the installed@nuxt/cli
for parsing args, etc.I would welcome feedback from the team + community, in identifying possible issues and figuring out possible solutions for any unforeseen ones.
The text was updated successfully, but these errors were encountered: