modules/*/index.tsmodules/*.ts
nuxt.config.ts separately.
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.- First, the modules defined in
nuxt.config.tsare loaded. - Then, modules found in the
modules/directory are executed, and they load in alphabetical order.