Movatterモバイル変換


[0]ホーム

URL:


Wayback Machine
42 captures
16 Nov 2022 - 08 Oct 2025
MayJUNJul
02
202220232024
success
fail
COLLECTED BY
Collection:Common Crawl
Web crawl data from Common Crawl.
TIMESTAMPS
loading
The Wayback Machine - http://web.archive.org/web/20230602151554/https://nuxt.com/docs/guide/concepts/modules
✨ Meet Tairo - The admin dashboard template powered by Nuxt + Tailwind CSSPreviewLearn more

Modules

Nuxt provides a module system to extend the framework core and simplify integrations. You don't need to develop everything from scratch or maintain boilerplate if there is already a Nuxt module for it. Adding Nuxt modules is possible usingnuxt.config.

Exploring Nuxt Modules

When developing production-grade applications with Nuxt you might find that the framework's core functionality is not enough. Nuxt can be extended with configuration options and plugins, but maintaining these customizations across multiple projects can be tedious, repetitive and time-consuming. On the other hand, supporting every project's needs out of the box would make Nuxt very complex and hard to use.

This is one of the reasons why Nuxt provides a module system that makes it possible to extend the core. Nuxt modules are async functions that sequentially run when starting Nuxt in development mode usingnuxi dev or building a project for production withnuxi build. They can override templates, configure webpack loaders, add CSS libraries, and perform many other useful tasks.

Best of all, Nuxt modules can be distributed in npm packages. This makes it possible for them to be reused across projects and shared with the community, helping create an ecosystem of high-quality add-ons.

👉

Themodules Property

Once you have installed the modules you can then add them to yournuxt.config.ts file under themodules property. Module developers usually provide additional steps and details for usage.

nuxt.config.ts
exportdefaultdefineNuxtConfig({
modules: [
// Using package name (recommended usage)
'@nuxtjs/example',
// Load a local module
'./modules/example',
// Add module with inline-options
['./modules/example', {token:'123' }]
// Inline module definition
async (inlineOptions,nuxt)=> { }
]
})
⚠️

Nuxt modules are now build-time-only, and thebuildModules property used in Nuxt 2 is deprecated in favor ofmodules.

Module Development

Everyone has the opportunity to develop modules. Read more about developing modules in theModule Author Guide.

👉
Read more inModule Author Guide.

[8]ページ先頭

©2009-2025 Movatter.jp