Skip to content

Register modules via package.json #33

Description

@galvez

Introduce a small change to @nuxt/config that infers if ${rootDir}/package.json has nuxt.modules or nuxt.devModules, loads it and merges them into the config automatically.

This would allow for some modules to to self register into Nuxt applications without having to modify nuxt.config.js (or, without requiring nuxt.config.js to exist in the first place).

Usage example: installing @nuxt/press could update package.json to include:

"nuxt": {
  "modules": ["@nuxt/press"]
}

So users of @nuxt/press could use press.config.js (example) without requiring to have a full blown nuxt.config.js file (for most simple uses).

This opens up a path for specialized modules to be used/implemented as micro frameworks with Nuxt as a core framework. These specialized modules could offer configuration via their own file without requiring users to have nuxt.config.js.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions