Skip to content

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

@martinszeltins

Description

@martinszeltins

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

  • Check existing discussions and issues.

Activity

transferred this issue fromnuxt/nuxton Mar 15, 2024
changed the title [-]When working with Layers, Nuxt adds the module to the root nuxt.config.ts but that is not what I wanted[/-] [+]`nuxt module add` -> select the `nuxt.config.ts` to install when working with layers[/+] on Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @atinux@martinszeltins

      Issue actions

        `nuxt module add` -> select the `nuxt.config.ts` to install when working with layers · Issue #361 · nuxt/cli