Modules 源码
installModule(module, inlineOptions)
程序化使用 源码
loadNuxt(loadOptions)
buildNuxt(nuxt)
loadNuxtConfig(loadOptions)
checkNuxtCompatibility(constraints)
assertNuxtCompatibility(constraints)
hasNuxtCompatibility(constraints)
isNuxt2()
isNuxt3()
getNuxtVersion()
自动导入 源码
addImports(imports)
addImportsDir(importDirs)
addImportsSources(importSources)
addComponentsDir(dir)
addComponent(componentObject)
Context 源码
extendPages (callback: pages => void)
extendRouteRules (route: string, rule: NitroRouteConfig, options: ExtendRouteRulesOptions)
addRouteMiddleware (input: NuxtMiddleware | NuxtMiddleware[], options: AddRouteMiddlewareOptions)
Plugins 源码
addPlugin(pluginOptions, { append? })
addPluginTemplate(pluginOptions, { append? })
addTemplate(templateOptions)
updateTemplates({ filter?: ResolvedNuxtTemplate => boolean })
Nitro 源码
addServerHandler (handler)
addDevServerHandler (handler)
useNitro()
(only usable after ready
hook)addServerPlugin
addPrerenderRoutes
Resolving 源码
resolvePath (path, resolveOptions?)
resolveAlias (path, aliases?)
findPath (paths, resolveOptions?)
createResolver (base)
Logging 源码
extendWebpackConfig(callback, options?)
extendViteConfig(callback, options?)
addWebpackPlugin(webpackPlugin, options?)
addVitePlugin(vitePlugin, options?)