mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-24 14:45:15 +00:00
3ec108493d
* docs: simplify docs to only markdown * Create nuxt-config.md * chore: update * chore: add readme
2.7 KiB
2.7 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)
extendRouteRules (route: string, rule: NitroRouteConfig, options: ExtendRouteRulesOptions)
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?)