-
Notifications
You must be signed in to change notification settings - Fork 65
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
nuxi module add
always install module as dependcies, even it should be devDependencies
#454
Comments
Actually this is how we detect where to install the dependency: cli/src/commands/module/add.ts Line 63 in bca75ab
I think we can add an exception for Happy to open a PR for it? |
Maybe try it 🥰 |
@atinux I found a question When initializing a Nuxt 3 project, nuxt and vue are installed by default as dependencies instead of devDependencies. The detection above is done by checking if nuxt is a devDependency, i.e. if nuxt in the user's project is not a devDependency, then any dependencies added by the user's module add will not be installed as devDependencies. I'm not quite sure if all the official Nuxt modules need to be installed as devDependencies, but what I do know so far is that the manual install of @nuxt/eslint requires it and eslint to be installed as devDependencies. |
Actually, everything can be a |
in general I would think modules should match if anything we could support a flag to allow the user to choose ( |
For example, when I install
@nuxt/eslint
, for pnpm, I will installeslint
and@nuxt/eslint
asdevDepencies
:But when I use
nuxi module add eslint
, it runs:pnpm add @nuxt/eslint // didn't have eslint
The text was updated successfully, but these errors were encountered: