mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-16 02:44:51 +00:00
9a0fc57724
Co-authored-by: Sébastien Chopin <seb@nuxtjs.com> Co-authored-by: pooya parsa <pyapar@gmail.com>
82 lines
1.9 KiB
Markdown
82 lines
1.9 KiB
Markdown
# Kit Utilities
|
|
|
|
::ReadMore{link="/guide/going-further/kit"}
|
|
::
|
|
|
|
## Utilities
|
|
|
|
### Modules
|
|
|
|
[source code](https://github.com/nuxt/framework/blob/main/packages/kit/src/module)
|
|
|
|
- `installModule(module, inlineOptions)`
|
|
|
|
### Programmatic usage
|
|
|
|
[source code](https://github.com/nuxt/framework/blob/main/packages/kit/src/loader)
|
|
|
|
- `loadNuxt(loadOptions)`
|
|
- `buildNuxt(nuxt)`
|
|
- `loadNuxtConfig(loadOptions)`
|
|
|
|
### Compatibility
|
|
|
|
[source code](https://github.com/nuxt/framework/blob/main/packages/kit/src/compatibility.ts)
|
|
|
|
- `checkNuxtCompatibility(constraints)`
|
|
- `assertNuxtCompatibility(constraints)`
|
|
- `hasNuxtCompatibility(constraints)`
|
|
- `isNuxt2()`
|
|
- `isNuxt3()`
|
|
- `getNuxtVersion()`
|
|
|
|
### Components
|
|
|
|
[source code](https://github.com/nuxt/framework/blob/main/packages/kit/src/components.ts)
|
|
|
|
- `addComponentsDir(dir)`
|
|
- `addComponent(componentObject)`
|
|
|
|
### Context
|
|
|
|
[source code](https://github.com/nuxt/framework/blob/main/packages/kit/src/context.ts)
|
|
|
|
- `useNuxt()`
|
|
|
|
### Plugins
|
|
|
|
[source code](https://github.com/nuxt/framework/blob/main/packages/kit/src/plugin.ts)
|
|
|
|
- `addPlugin(pluginOptions, { append? })`
|
|
- `addPluginTemplate(pluginOptions, { append? })`
|
|
|
|
### Templates
|
|
|
|
[source code](https://github.com/nuxt/framework/blob/main/packages/kit/src/template.ts)
|
|
|
|
- `addTemplate(templateOptions)`
|
|
|
|
### Server
|
|
|
|
[source code](https://github.com/nuxt/framework/blob/main/packages/kit/src/server.ts)
|
|
|
|
- `addServerMiddleware(serverMiddleware)`
|
|
|
|
### Resolving
|
|
|
|
[source code](https://github.com/nuxt/framework/blob/main/packages/kit/src/resolve.ts)
|
|
|
|
- `resolvePath (path, resolveOptions?)`
|
|
- `resolveAlias (path, aliases?)`
|
|
- `findPath (paths, resolveOptions?)`
|
|
- `createResolver (base)`
|
|
|
|
### Builder
|
|
|
|
[source code](https://github.com/nuxt/framework/blob/main/packages/kit/src/build.ts)
|
|
|
|
- `extendWebpackConfig(callback, options?)`
|
|
- `extendViteConfig(callback, options?)`
|
|
- `addWebpackPlugin(webpackPlugin, options?)`
|
|
- `addVitePlugin(vitePlugin, options?)`
|