mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 16:43:55 +00:00
2.6 KiB
2.6 KiB
title | description |
---|---|
Kit Utilities | Nuxt Kit provides composable utilities to help interacting with Nuxt Hooks and Nuxt Builder. |
Kit Utilities
::ReadMore{link="/docs/guide/going-further/kit"} ::
Utilities
Modules
installModule(module, inlineOptions)
Programmatic Usage
loadNuxt(loadOptions)
buildNuxt(nuxt)
loadNuxtConfig(loadOptions)
Compatibility
checkNuxtCompatibility(constraints)
assertNuxtCompatibility(constraints)
hasNuxtCompatibility(constraints)
isNuxt2()
isNuxt3()
getNuxtVersion()
Auto-imports
addImports(imports)
addImportsDir(importDirs)
addImportsSources(importSources)
Components
addComponentsDir(dir)
addComponent(componentObject)
Context
useNuxt()
Pages
extendPages (callback: pages => void)
Plugins
addPlugin(pluginOptions, { append? })
addPluginTemplate(pluginOptions, { append? })
Templates
addTemplate(templateOptions)
updateTemplates({ filter?: ResolvedNuxtTemplate => boolean })
Nitro
addServerHandler (handler)
addDevServerHandler (handler)
useNitro()
(only usable afterready
hook)addServerPlugin
addPrerenderRoutes
Resolving
resolvePath (path, resolveOptions?)
resolveAlias (path, aliases?)
findPath (paths, resolveOptions?)
createResolver (base)
Logging
useLogger(scope?)
Builder
extendWebpackConfig(callback, options?)
extendViteConfig(callback, options?)
addWebpackPlugin(webpackPlugin, options?)
addVitePlugin(vitePlugin, options?)