cli icon indicating copy to clipboard operation
cli copied to clipboard

Never install `@nuxt/fonts` or `@nuxt/icon` if `@nuxt/ui` is selected

Open HugoRCD opened this issue 7 months ago • 3 comments

In the wizard for init a project, if the user ticks one of the official modules that is already installed by default by @nuxt/ui, the module should not be installed because it is not useful in the first place and in some cases it may bug the configurations applied by default by nuxt/ui.

https://github.com/nuxt/cli/blob/main/packages/nuxi/src/commands/init.ts#L270

I'll try to make a PR for this

HugoRCD avatar May 12 '25 08:05 HugoRCD

Rather than hard-coding, perhaps we can detect from the dependencies of any of these modules. If a module is a dependency then it can be removed from the list of modules to install.

danielroe avatar May 13 '25 12:05 danielroe

also, ideally if the user has installed nuxt/fonts or icon, then nuxt/ui should augment or override some of their configuration, but it shouldn't cause any bugs. (I would regard this as a bug if so, and we should solve it in nuxt/ui and/or fonts/icon).

danielroe avatar May 13 '25 12:05 danielroe

Indeed it shouldn't 🤔 I just pushed a version without the hard-coding dependencies

HugoRCD avatar May 13 '25 12:05 HugoRCD