nuxt / nuxt/cli

`nuxt module add` -> select the `nuxt.config.ts` to install when working with layers

Open
#361 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
399
Forks
119
Avg merge
20h 59m
Merged PRs (30d)
65

Description

Describe the feature

When working with Nuxt Layers and you add a Nuxt module using the Nuxt Devtools or using nuxi nuxi module add tailwind it adds the module to the root nuxt.config.ts file and this is not configurable.

My nuxt.config.ts file is only for extending layers and I do not want Nuxt to add modules here. It would be very nice if this was configurable (or if asked me which nuxt.config.ts to use) so that I can specify which nuxt.config.ts file I actually want it to use. Maybe before adding the module it could ask me which one I want it to add the module to.

common
  └─ components
  └─ composables
  └─ nuxt.config.ts   <------ I actually want nuxi to add the module here
users
  └─ components
  └─ composables
  └─ nuxt.config.ts
nuxt.config.ts        <--------- it adds it here (root)
Additional information
  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?
Final checks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The entry point is nuxi module add tailwind; start by tracing how it selects the root nuxt.config.ts when Nuxt Layers are present. Compare the Nuxt Devtools path and the layer layout in the report, then define how a configurable or prompted target is selected. Done means module installation can target the chosen layer config instead of always modifying the root file.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt, typescript
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.