Kit Utilities
👉
Read more in 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, { prepend? })
addImportsSources(importSources)
Components
addComponentsDir(dir)
addComponent(componentObject)
Context
useNuxt()
Pages
extendPages (callback: pages => void)
extendRouteRules (route: string, rule: NitroRouteConfig, options: ExtendRouteRulesOptions)
addRouteMiddleware (input: NuxtMiddleware | NuxtMiddleware[], options: AddRouteMiddlewareOptions)
Plugins
addPlugin(pluginOptions, { append? })
addPluginTemplate(pluginOptions, { append? })
Templates
addTemplate(templateOptions)
addTypeTemplate(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?)