Skip to main content
It is a good place to place any local modules you develop while building your application. The auto-registered files patterns are:
  • modules/*/index.ts
  • modules/*.ts
You don’t need to add those local modules to your nuxt.config.ts separately.
When starting Nuxt, the hello module will be registered and the /api/hello route will be available.
Note that all components, pages, composables and other files that would be normally placed in your app/ directory need to be in modules/your-module/runtime/app/. This ensures they can be type-checked properly.
Modules are executed in the following sequence:
  • First, the modules defined in nuxt.config.ts are loaded.
  • Then, modules found in the modules/ directory are executed, and they load in alphabetical order.
You can change the order of local module by adding a number to the front of each directory name: