@nuxt/kit 4.2.2 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,552 +1,585 @@
1
- import * as _nuxt_schema from '@nuxt/schema';
2
- import { ModuleOptions, ModuleDefinition, NuxtModule, NuxtConfig, Nuxt, ModuleMeta, NuxtOptions, SchemaDefinition, NuxtAppConfig, NuxtCompatibility, NuxtCompatibilityIssues, Component, ComponentsDir, NuxtTemplate, NuxtMiddleware, NuxtHooks, NuxtPlugin, NuxtPluginTemplate, ResolvedNuxtTemplate, NuxtServerTemplate, NuxtTypeTemplate } from '@nuxt/schema';
3
- import { LoadConfigOptions } from 'c12';
4
- import { Import, InlinePreset } from 'unimport';
5
- import { WebpackPluginInstance, Configuration } from 'webpack';
6
- import { RspackPluginInstance } from '@rspack/core';
7
- import { Plugin, UserConfig } from 'vite';
8
- import * as unctx from 'unctx';
9
- import { NitroRouteConfig, NitroEventHandler, NitroDevEventHandler, Nitro } from 'nitropack/types';
10
- import { GlobOptions } from 'tinyglobby';
11
- import * as consola from 'consola';
12
- import { ConsolaOptions } from 'consola';
1
+ import { ConsolaInstance, ConsolaOptions } from "consola";
2
+ import { UseContext } from "unctx";
3
+ import "pkg-types";
4
+ import { GlobOptions } from "tinyglobby";
5
+ import { LoadConfigOptions } from "c12";
6
+ import { Component, ComponentsDir, ModuleDefinition, ModuleMeta, ModuleOptions, Nuxt, NuxtAppConfig, NuxtCompatibility, NuxtCompatibilityIssues, NuxtConfig, NuxtHooks, NuxtMiddleware, NuxtModule, NuxtOptions, NuxtPlugin, NuxtPluginTemplate, NuxtServerTemplate, NuxtTemplate, NuxtTypeTemplate, ResolvedNuxtTemplate, SchemaDefinition } from "@nuxt/schema";
7
+ import { Import, InlinePreset } from "unimport";
8
+ import { Configuration, WebpackPluginInstance } from "webpack";
9
+ import { RspackPluginInstance } from "@rspack/core";
10
+ import { Plugin, UserConfig } from "vite";
11
+ import * as NitroV2 from "nitropack/types";
12
+ import * as NitroV3 from "nitro/types";
13
13
 
14
+ //#region src/module/define.d.ts
14
15
  /**
15
- * Define a Nuxt module, automatically merging defaults with user provided options, installing
16
- * any hooks that are provided, and calling an optional setup function for full control.
17
- */
16
+ * Define a Nuxt module, automatically merging defaults with user provided options, installing
17
+ * any hooks that are provided, and calling an optional setup function for full control.
18
+ */
18
19
  declare function defineNuxtModule<TOptions extends ModuleOptions>(definition: ModuleDefinition<TOptions, Partial<TOptions>, false> | NuxtModule<TOptions, Partial<TOptions>, false>): NuxtModule<TOptions, TOptions, false>;
19
20
  declare function defineNuxtModule<TOptions extends ModuleOptions>(): {
20
- with: <TOptionsDefaults extends Partial<TOptions>>(definition: ModuleDefinition<TOptions, TOptionsDefaults, true> | NuxtModule<TOptions, TOptionsDefaults, true>) => NuxtModule<TOptions, TOptionsDefaults, true>;
21
+ with: <TOptionsDefaults extends Partial<TOptions>>(definition: ModuleDefinition<TOptions, TOptionsDefaults, true> | NuxtModule<TOptions, TOptionsDefaults, true>) => NuxtModule<TOptions, TOptionsDefaults, true>;
21
22
  };
22
-
23
+ //#endregion
24
+ //#region src/module/install.d.ts
23
25
  type ModuleToInstall = string | NuxtModule<ModuleOptions, Partial<ModuleOptions>, false>;
24
26
  /**
25
- * Installs a set of modules on a Nuxt instance.
26
- * @internal
27
- */
27
+ * Installs a set of modules on a Nuxt instance.
28
+ * @internal
29
+ */
28
30
  declare function installModules(modulesToInstall: Map<ModuleToInstall, Record<string, any>>, resolvedModulePaths: Set<string>, nuxt?: Nuxt): Promise<void>;
29
31
  /**
30
- * Installs a module on a Nuxt instance.
31
- * @deprecated Use module dependencies.
32
- */
33
- declare function installModule<T extends string | NuxtModule, Config extends Extract<NonNullable<NuxtConfig['modules']>[number], [T, any]>>(moduleToInstall: T, inlineOptions?: [Config] extends [never] ? any : Config[1], nuxt?: Nuxt): Promise<void>;
32
+ * Installs a module on a Nuxt instance.
33
+ * @deprecated Use module dependencies.
34
+ */
35
+ declare function installModule<T extends string | NuxtModule, Config extends Extract<NonNullable<NuxtConfig["modules"]>[number], [T, any]>>(moduleToInstall: T, inlineOptions?: [Config] extends [never] ? any : Config[1], nuxt?: Nuxt): Promise<void>;
34
36
  declare function resolveModuleWithOptions(definition: NuxtModule<any> | string | false | undefined | null | [(NuxtModule | string)?, Record<string, any>?], nuxt: Nuxt): {
35
- resolvedPath?: string;
36
- module: string | NuxtModule<any>;
37
- options: Record<string, any>;
37
+ resolvedPath?: string;
38
+ module: string | NuxtModule<any>;
39
+ options: Record<string, any>;
38
40
  } | undefined;
39
41
  declare function loadNuxtModuleInstance(nuxtModule: string | NuxtModule, nuxt?: Nuxt): Promise<{
40
- nuxtModule: NuxtModule<any>;
41
- buildTimeModuleMeta: ModuleMeta;
42
- resolvedModulePath?: string;
42
+ nuxtModule: NuxtModule<any>;
43
+ buildTimeModuleMeta: ModuleMeta;
44
+ resolvedModulePath?: string;
43
45
  }>;
44
46
  declare function getDirectory(p: string): string;
45
47
  declare const normalizeModuleTranspilePath: (p: string) => string;
46
-
47
- /**
48
- * Check if a Nuxt module is installed by name.
49
- *
50
- * This will check both the installed modules and the modules to be installed. Note
51
- * that it cannot detect if a module is _going to be_ installed programmatically by another module.
52
- */
48
+ //#endregion
49
+ //#region src/module/compatibility.d.ts
50
+ /**
51
+ * Check if a Nuxt module is installed by name.
52
+ *
53
+ * This will check both the installed modules and the modules to be installed. Note
54
+ * that it cannot detect if a module is _going to be_ installed programmatically by another module.
55
+ */
53
56
  declare function hasNuxtModule(moduleName: string, nuxt?: Nuxt): boolean;
54
57
  /**
55
- * Checks if a Nuxt Module is compatible with a given semver version.
56
- */
58
+ * Checks if a Nuxt module is compatible with a given semver version.
59
+ */
57
60
  declare function hasNuxtModuleCompatibility(module: string | NuxtModule, semverVersion: string, nuxt?: Nuxt): Promise<boolean>;
58
61
  /**
59
- * Get the version of a Nuxt module.
60
- *
61
- * Scans installed modules for the version, if it's not found it will attempt to load the module instance and get the version from there.
62
- */
62
+ * Get the version of a Nuxt module.
63
+ *
64
+ * Scans installed modules for the version, if it's not found it will attempt to load the module instance and get the version from there.
65
+ */
63
66
  declare function getNuxtModuleVersion(module: string | NuxtModule, nuxt?: Nuxt | any): Promise<string | false>;
64
-
65
- interface LoadNuxtConfigOptions extends Omit<LoadConfigOptions<NuxtConfig>, 'overrides'> {
66
- overrides?: Exclude<LoadConfigOptions<NuxtConfig>['overrides'], Promise<any> | Function>;
67
+ //#endregion
68
+ //#region src/loader/config.d.ts
69
+ interface LoadNuxtConfigOptions extends Omit<LoadConfigOptions<NuxtConfig>, "overrides"> {
70
+ overrides?: Exclude<LoadConfigOptions<NuxtConfig>["overrides"], Promise<any> | Function>;
67
71
  }
68
72
  declare function loadNuxtConfig(opts: LoadNuxtConfigOptions): Promise<NuxtOptions>;
69
-
73
+ //#endregion
74
+ //#region src/loader/schema.d.ts
70
75
  declare function extendNuxtSchema(def: SchemaDefinition | (() => SchemaDefinition)): void;
71
-
76
+ //#endregion
77
+ //#region src/loader/nuxt.d.ts
72
78
  interface LoadNuxtOptions extends LoadNuxtConfigOptions {
73
- /** Load nuxt with development mode */
74
- dev?: boolean;
75
- /** Use lazy initialization of nuxt if set to false */
76
- ready?: boolean;
79
+ /** Load nuxt with development mode */
80
+ dev?: boolean;
81
+ /** Use lazy initialization of nuxt if set to false */
82
+ ready?: boolean;
77
83
  }
78
84
  declare function loadNuxt(opts: LoadNuxtOptions): Promise<Nuxt>;
79
85
  declare function buildNuxt(nuxt: Nuxt): Promise<any>;
80
-
86
+ //#endregion
87
+ //#region src/layers.d.ts
81
88
  interface LayerDirectories {
82
- /** Nuxt rootDir (`/` by default) */
83
- readonly root: string;
84
- /** Nitro source directory (`/server` by default) */
85
- readonly server: string;
86
- /** Local modules directory (`/modules` by default) */
87
- readonly modules: string;
88
- /** Shared directory (`/shared` by default) */
89
- readonly shared: string;
90
- /** Public directory (`/public` by default) */
91
- readonly public: string;
92
- /** Nuxt srcDir (`/app/` by default) */
93
- readonly app: string;
94
- /** Layouts directory (`/app/layouts` by default) */
95
- readonly appLayouts: string;
96
- /** Middleware directory (`/app/middleware` by default) */
97
- readonly appMiddleware: string;
98
- /** Pages directory (`/app/pages` by default) */
99
- readonly appPages: string;
100
- /** Plugins directory (`/app/plugins` by default) */
101
- readonly appPlugins: string;
89
+ /** Nuxt rootDir (`/` by default) */
90
+ readonly root: string;
91
+ /** Nitro source directory (`/server` by default) */
92
+ readonly server: string;
93
+ /** Local modules directory (`/modules` by default) */
94
+ readonly modules: string;
95
+ /** Shared directory (`/shared` by default) */
96
+ readonly shared: string;
97
+ /** Public directory (`/public` by default) */
98
+ readonly public: string;
99
+ /** Nuxt srcDir (`/app/` by default) */
100
+ readonly app: string;
101
+ /** Layouts directory (`/app/layouts` by default) */
102
+ readonly appLayouts: string;
103
+ /** Middleware directory (`/app/middleware` by default) */
104
+ readonly appMiddleware: string;
105
+ /** Pages directory (`/app/pages` by default) */
106
+ readonly appPages: string;
107
+ /** Plugins directory (`/app/plugins` by default) */
108
+ readonly appPlugins: string;
102
109
  }
103
110
  /**
104
- * Get the resolved directory paths for all layers in a Nuxt application.
105
- *
106
- * Returns an array of LayerDirectories objects, ordered by layer priority:
107
- * - The first layer is the user/project layer (highest priority)
108
- * - Earlier layers override later layers in the array
109
- * - Base layers appear last in the array (lowest priority)
110
- *
111
- * @param nuxt - The Nuxt instance to get layers from. Defaults to the current Nuxt context.
112
- * @returns Array of LayerDirectories objects, ordered by priority (user layer first)
113
- */
114
- declare function getLayerDirectories(nuxt?: _nuxt_schema.Nuxt): LayerDirectories[];
115
-
116
- declare function setGlobalHead(head: NuxtAppConfig['head']): void;
117
-
111
+ * Get the resolved directory paths for all layers in a Nuxt application.
112
+ *
113
+ * Returns an array of LayerDirectories objects, ordered by layer priority:
114
+ * - The first layer is the user/project layer (highest priority)
115
+ * - Earlier layers override later layers in the array
116
+ * - Base layers appear last in the array (lowest priority)
117
+ *
118
+ * @param nuxt - The Nuxt instance to get layers from. Defaults to the current Nuxt context.
119
+ * @returns Array of LayerDirectories objects, ordered by priority (user layer first)
120
+ */
121
+ declare function getLayerDirectories(nuxt?: Nuxt): LayerDirectories[];
122
+ //#endregion
123
+ //#region src/head.d.ts
124
+ declare function setGlobalHead(head: NuxtAppConfig["head"]): void;
125
+ //#endregion
126
+ //#region src/imports.d.ts
118
127
  declare function addImports(imports: Import | Import[]): void;
119
128
  declare function addImportsDir(dirs: string | string[], opts?: {
120
- prepend?: boolean;
129
+ prepend?: boolean;
121
130
  }): void;
122
131
  declare function addImportsSources(presets: InlinePreset | InlinePreset[]): void;
123
-
132
+ //#endregion
133
+ //#region src/runtime-config.d.ts
124
134
  /**
125
- * Access 'resolved' Nuxt runtime configuration, with values updated from environment.
126
- *
127
- * This mirrors the runtime behavior of Nitro.
128
- */
135
+ * Access 'resolved' Nuxt runtime configuration, with values updated from environment.
136
+ *
137
+ * This mirrors the runtime behavior of Nitro.
138
+ */
129
139
  declare function useRuntimeConfig(): Record<string, any>;
130
140
  /**
131
- * Update Nuxt runtime configuration.
132
- */
141
+ * Update Nuxt runtime configuration.
142
+ */
133
143
  declare function updateRuntimeConfig(runtimeConfig: Record<string, unknown>): void | Promise<void>;
134
-
144
+ //#endregion
145
+ //#region src/build.d.ts
146
+ type Arrayable<T> = T | T[];
147
+ type Thenable<T> = T | Promise<T>;
135
148
  interface ExtendConfigOptions {
136
- /**
137
- * Install plugin on dev
138
- * @default true
139
- */
140
- dev?: boolean;
141
- /**
142
- * Install plugin on build
143
- * @default true
144
- */
145
- build?: boolean;
146
- /**
147
- * Install plugin on server side
148
- * @default true
149
- */
150
- server?: boolean;
151
- /**
152
- * Install plugin on client side
153
- * @default true
154
- */
155
- client?: boolean;
156
- /**
157
- * Prepends the plugin to the array with `unshift()` instead of `push()`.
158
- */
159
- prepend?: boolean;
160
- }
161
- interface ExtendWebpackConfigOptions extends ExtendConfigOptions {
149
+ /**
150
+ * Install plugin on dev
151
+ * @default true
152
+ */
153
+ dev?: boolean;
154
+ /**
155
+ * Install plugin on build
156
+ * @default true
157
+ */
158
+ build?: boolean;
159
+ /**
160
+ * Install plugin on server side
161
+ * @default true
162
+ */
163
+ server?: boolean;
164
+ /**
165
+ * Install plugin on client side
166
+ * @default true
167
+ */
168
+ client?: boolean;
169
+ /**
170
+ * Prepends the plugin to the array with `unshift()` instead of `push()`.
171
+ */
172
+ prepend?: boolean;
162
173
  }
163
- interface ExtendViteConfigOptions extends Omit<ExtendConfigOptions, 'server' | 'client'> {
164
- /**
165
- * Extend server Vite configuration
166
- * @default true
167
- * @deprecated calling \`extendViteConfig\` with only server/client environment is deprecated.
168
- * Nuxt 5+ uses the Vite Environment API which shares a configuration between environments.
169
- * You can likely use a Vite plugin to achieve the same result.
170
- */
171
- server?: boolean;
172
- /**
173
- * Extend client Vite configuration
174
- * @default true
175
- * @deprecated calling \`extendViteConfig\` with only server/client environment is deprecated.
176
- * Nuxt 5+ uses the Vite Environment API which shares a configuration between environments.
177
- * You can likely use a Vite plugin to achieve the same result.
178
- */
179
- client?: boolean;
174
+ interface ExtendWebpackConfigOptions extends ExtendConfigOptions {}
175
+ interface ExtendViteConfigOptions extends Omit<ExtendConfigOptions, "server" | "client"> {
176
+ /**
177
+ * Extend server Vite configuration
178
+ * @default true
179
+ * @deprecated calling \`extendViteConfig\` with only server/client environment is deprecated.
180
+ * Nuxt 5+ uses the Vite Environment API which shares a configuration between environments.
181
+ * You can likely use a Vite plugin to achieve the same result.
182
+ */
183
+ server?: boolean;
184
+ /**
185
+ * Extend client Vite configuration
186
+ * @default true
187
+ * @deprecated calling \`extendViteConfig\` with only server/client environment is deprecated.
188
+ * Nuxt 5+ uses the Vite Environment API which shares a configuration between environments.
189
+ * You can likely use a Vite plugin to achieve the same result.
190
+ */
191
+ client?: boolean;
180
192
  }
181
- /**
182
- * Extend webpack config
183
- *
184
- * The fallback function might be called multiple times
185
- * when applying to both client and server builds.
186
- */
187
- declare const extendWebpackConfig: (fn: ((config: Configuration) => void), options?: ExtendWebpackConfigOptions) => void;
188
- /**
189
- * Extend rspack config
190
- *
191
- * The fallback function might be called multiple times
192
- * when applying to both client and server builds.
193
- */
194
- declare const extendRspackConfig: (fn: ((config: Configuration) => void), options?: ExtendWebpackConfigOptions) => void;
195
- /**
196
- * Extend Vite config
197
- */
198
- declare function extendViteConfig(fn: ((config: UserConfig) => void), options?: ExtendViteConfigOptions): (() => void) | undefined;
199
- /**
200
- * Append webpack plugin to the config.
201
- */
202
- declare function addWebpackPlugin(pluginOrGetter: WebpackPluginInstance | WebpackPluginInstance[] | (() => WebpackPluginInstance | WebpackPluginInstance[]), options?: ExtendWebpackConfigOptions): void;
203
- /**
204
- * Append rspack plugin to the config.
205
- */
206
- declare function addRspackPlugin(pluginOrGetter: RspackPluginInstance | RspackPluginInstance[] | (() => RspackPluginInstance | RspackPluginInstance[]), options?: ExtendWebpackConfigOptions): void;
207
- /**
208
- * Append Vite plugin to the config.
209
- */
210
- declare function addVitePlugin(pluginOrGetter: Plugin | Plugin[] | (() => Plugin | Plugin[]), options?: ExtendConfigOptions): void;
193
+ type ExtendWebpacklikeConfig = (fn: (config: Configuration) => void, options?: ExtendWebpackConfigOptions) => void;
194
+ /**
195
+ * Extend webpack config
196
+ *
197
+ * The fallback function might be called multiple times
198
+ * when applying to both client and server builds.
199
+ */
200
+ declare const extendWebpackConfig: ExtendWebpacklikeConfig;
201
+ /**
202
+ * Extend rspack config
203
+ *
204
+ * The fallback function might be called multiple times
205
+ * when applying to both client and server builds.
206
+ */
207
+ declare const extendRspackConfig: ExtendWebpacklikeConfig;
208
+ /**
209
+ * Extend Vite config
210
+ */
211
+ declare function extendViteConfig(fn: ((config: UserConfig) => Thenable<void>), options?: ExtendViteConfigOptions): (() => void) | undefined;
212
+ /**
213
+ * Append webpack plugin to the config.
214
+ */
215
+ declare function addWebpackPlugin(pluginOrGetter: Arrayable<WebpackPluginInstance> | (() => Thenable<Arrayable<WebpackPluginInstance>>), options?: ExtendWebpackConfigOptions): void;
216
+ /**
217
+ * Append rspack plugin to the config.
218
+ */
219
+ declare function addRspackPlugin(pluginOrGetter: Arrayable<RspackPluginInstance> | (() => Thenable<Arrayable<RspackPluginInstance>>), options?: ExtendWebpackConfigOptions): void;
220
+ /**
221
+ * Append Vite plugin to the config.
222
+ */
223
+ declare function addVitePlugin(pluginOrGetter: Arrayable<Plugin> | (() => Thenable<Arrayable<Plugin>>), options?: ExtendConfigOptions): void;
211
224
  interface AddBuildPluginFactory {
212
- vite?: () => Plugin | Plugin[];
213
- webpack?: () => WebpackPluginInstance | WebpackPluginInstance[];
214
- rspack?: () => RspackPluginInstance | RspackPluginInstance[];
225
+ vite?: () => Thenable<Arrayable<Plugin>>;
226
+ webpack?: () => Thenable<Arrayable<WebpackPluginInstance>>;
227
+ rspack?: () => Thenable<Arrayable<RspackPluginInstance>>;
215
228
  }
216
229
  declare function addBuildPlugin(pluginFactory: AddBuildPluginFactory, options?: ExtendConfigOptions): void;
217
-
230
+ //#endregion
231
+ //#region src/compatibility.d.ts
218
232
  declare function normalizeSemanticVersion(version: string): string;
219
233
  /**
220
- * Check version constraints and return incompatibility issues as an array
221
- */
234
+ * Check version constraints and return incompatibility issues as an array
235
+ */
222
236
  declare function checkNuxtCompatibility(constraints: NuxtCompatibility, nuxt?: Nuxt): Promise<NuxtCompatibilityIssues>;
223
237
  /**
224
- * Check version constraints and throw a detailed error if has any, otherwise returns true
225
- */
238
+ * Check version constraints and throw a detailed error if has any, otherwise returns true
239
+ */
226
240
  declare function assertNuxtCompatibility(constraints: NuxtCompatibility, nuxt?: Nuxt): Promise<true>;
227
241
  /**
228
- * Check version constraints and return true if passed, otherwise returns false
229
- */
242
+ * Check version constraints and return true if passed, otherwise returns false
243
+ */
230
244
  declare function hasNuxtCompatibility(constraints: NuxtCompatibility, nuxt?: Nuxt): Promise<boolean>;
245
+ type NuxtMajorVersion = 2 | 3 | 4;
231
246
  /**
232
- * Check if current Nuxt instance is of specified major version
233
- */
234
- declare function isNuxtMajorVersion(majorVersion: 2 | 3 | 4, nuxt?: Nuxt): boolean;
247
+ * Check if current Nuxt instance is of specified major version
248
+ */
249
+ declare function isNuxtMajorVersion(majorVersion: NuxtMajorVersion, nuxt?: Nuxt): boolean;
235
250
  /**
236
- * @deprecated Use `isNuxtMajorVersion(2, nuxt)` instead. This may be removed in \@nuxt/kit v5 or a future major version.
237
- */
251
+ * @deprecated Use `isNuxtMajorVersion(2, nuxt)` instead. This may be removed in \@nuxt/kit v5 or a future major version.
252
+ */
238
253
  declare function isNuxt2(nuxt?: Nuxt): boolean;
239
254
  /**
240
- * @deprecated Use `isNuxtMajorVersion(3, nuxt)` instead. This may be removed in \@nuxt/kit v5 or a future major version.
241
- */
255
+ * @deprecated Use `isNuxtMajorVersion(3, nuxt)` instead. This may be removed in \@nuxt/kit v5 or a future major version.
256
+ */
242
257
  declare function isNuxt3(nuxt?: Nuxt): boolean;
243
258
  /**
244
- * Get nuxt version
245
- */
259
+ * Get nuxt version
260
+ */
246
261
  declare function getNuxtVersion(nuxt?: Nuxt | any): string;
247
-
262
+ //#endregion
263
+ //#region src/components.d.ts
248
264
  /**
249
- * Register a directory to be scanned for components and imported only when used.
250
- */
265
+ * Register a directory to be scanned for components and imported only when used.
266
+ */
251
267
  declare function addComponentsDir(dir: ComponentsDir, opts?: {
252
- prepend?: boolean;
268
+ prepend?: boolean;
253
269
  }): void;
254
270
  type AddComponentOptions = {
255
- name: string;
256
- filePath: string;
257
- } & Partial<Exclude<Component, 'shortPath' | 'async' | 'level' | 'import' | 'asyncImport'>>;
258
- /**
259
- * This utility takes a file path or npm package that is scanned for named exports, which are get added automatically
260
- */
261
- declare function addComponentExports(opts: Omit<AddComponentOptions, 'name'> & {
262
- prefix?: string;
271
+ name: string;
272
+ filePath: string;
273
+ } & Partial<Exclude<Component, "shortPath" | "async" | "level" | "import" | "asyncImport">>;
274
+ /**
275
+ * This utility takes a file path or npm package that is scanned for named exports, which are get added automatically
276
+ */
277
+ declare function addComponentExports(opts: Omit<AddComponentOptions, "name"> & {
278
+ prefix?: string;
263
279
  }): void;
264
280
  /**
265
- * Register a component by its name and filePath.
266
- */
281
+ * Register a component by its name and filePath.
282
+ */
267
283
  declare function addComponent(opts: AddComponentOptions): void;
268
-
284
+ //#endregion
285
+ //#region src/context.d.ts
269
286
  /**
270
- * Direct access to the Nuxt global context - see https://github.com/unjs/unctx.
271
- * @deprecated Use `getNuxtCtx` instead
272
- */
273
- declare const nuxtCtx: unctx.UseContext<Nuxt>;
287
+ * Direct access to the Nuxt global context - see https://github.com/unjs/unctx.
288
+ * @deprecated Use `getNuxtCtx` instead
289
+ */
290
+ declare const nuxtCtx: UseContext<Nuxt>;
274
291
  /** Direct access to the Nuxt context with asyncLocalStorage - see https://github.com/unjs/unctx. */
275
292
  declare const getNuxtCtx: () => Nuxt | null;
276
293
  /**
277
- * Get access to Nuxt instance.
278
- *
279
- * Throws an error if Nuxt instance is unavailable.
280
- * @example
281
- * ```js
282
- * const nuxt = useNuxt()
283
- * ```
284
- */
294
+ * Get access to Nuxt instance.
295
+ *
296
+ * Throws an error if Nuxt instance is unavailable.
297
+ * @example
298
+ * ```js
299
+ * const nuxt = useNuxt()
300
+ * ```
301
+ */
285
302
  declare function useNuxt(): Nuxt;
286
303
  /**
287
- * Get access to Nuxt instance.
288
- *
289
- * Returns null if Nuxt instance is unavailable.
290
- * @example
291
- * ```js
292
- * const nuxt = tryUseNuxt()
293
- * if (nuxt) {
294
- * // Do something
295
- * }
296
- * ```
297
- */
304
+ * Get access to Nuxt instance.
305
+ *
306
+ * Returns null if Nuxt instance is unavailable.
307
+ * @example
308
+ * ```js
309
+ * const nuxt = tryUseNuxt()
310
+ * if (nuxt) {
311
+ * // Do something
312
+ * }
313
+ * ```
314
+ */
298
315
  declare function tryUseNuxt(): Nuxt | null;
299
316
  declare function runWithNuxtContext<T extends (...args: any[]) => any>(nuxt: Nuxt, fn: T): ReturnType<T>;
300
-
301
- declare function createIsIgnored(nuxt?: _nuxt_schema.Nuxt | null): (pathname: string, stats?: unknown) => boolean;
317
+ //#endregion
318
+ //#region src/ignore.d.ts
319
+ declare function createIsIgnored(nuxt?: Nuxt | null | undefined): (pathname: string, stats?: unknown) => boolean;
302
320
  /**
303
- * Return a filter function to filter an array of paths
304
- */
305
- declare function isIgnored(pathname: string, _stats?: unknown, nuxt?: _nuxt_schema.Nuxt | null): boolean;
321
+ * Return a filter function to filter an array of paths
322
+ */
323
+ declare function isIgnored(pathname: string, _stats?: unknown, nuxt?: Nuxt | null | undefined): boolean;
306
324
  declare function resolveIgnorePatterns(relativePath?: string): string[];
307
-
325
+ //#endregion
326
+ //#region src/layout.d.ts
308
327
  declare function addLayout(template: NuxtTemplate | string, name?: string): void;
309
-
310
- declare function extendPages(cb: NuxtHooks['pages:extend']): void;
328
+ //#endregion
329
+ //#region src/nitro-types.d.ts
330
+ type isNitroV2 = "options" extends keyof NitroV2.Nitro ? "___INVALID" extends keyof NitroV2.Nitro ? false : true : false;
331
+ type isNitroV3 = "options" extends keyof NitroV3.Nitro ? "___INVALID" extends keyof NitroV3.Nitro ? false : true : false;
332
+ type Nitro = isNitroV2 extends true ? isNitroV3 extends true ? NitroV2.Nitro | NitroV3.Nitro : NitroV2.Nitro : NitroV3.Nitro;
333
+ type NitroDevEventHandler = isNitroV2 extends true ? isNitroV3 extends true ? NitroV2.NitroDevEventHandler | NitroV3.NitroDevEventHandler : NitroV2.NitroDevEventHandler : NitroV3.NitroDevEventHandler;
334
+ type NitroEventHandler = isNitroV2 extends true ? isNitroV3 extends true ? NitroV2.NitroEventHandler | NitroV3.NitroEventHandler : NitroV2.NitroEventHandler : NitroV3.NitroEventHandler;
335
+ type NitroRouteConfig = isNitroV2 extends true ? isNitroV3 extends true ? NitroV2.NitroRouteConfig | NitroV3.NitroRouteConfig : NitroV2.NitroRouteConfig : NitroV3.NitroRouteConfig;
336
+ //#endregion
337
+ //#region src/pages.d.ts
338
+ declare function extendPages(cb: NuxtHooks["pages:extend"]): void;
311
339
  interface ExtendRouteRulesOptions {
312
- /**
313
- * Override route rule config
314
- * @default false
315
- */
316
- override?: boolean;
340
+ /**
341
+ * Override route rule config
342
+ * @default false
343
+ */
344
+ override?: boolean;
317
345
  }
318
346
  declare function extendRouteRules(route: string, rule: NitroRouteConfig, options?: ExtendRouteRulesOptions): void;
319
347
  interface AddRouteMiddlewareOptions {
320
- /**
321
- * Override existing middleware with the same name, if it exists
322
- * @default false
323
- */
324
- override?: boolean;
325
- /**
326
- * Prepend middleware to the list
327
- * @default false
328
- */
329
- prepend?: boolean;
348
+ /**
349
+ * Override existing middleware with the same name, if it exists
350
+ * @default false
351
+ */
352
+ override?: boolean;
353
+ /**
354
+ * Prepend middleware to the list
355
+ * @default false
356
+ */
357
+ prepend?: boolean;
330
358
  }
331
359
  declare function addRouteMiddleware(input: NuxtMiddleware | NuxtMiddleware[], options?: AddRouteMiddlewareOptions): void;
332
-
360
+ //#endregion
361
+ //#region src/plugin.d.ts
333
362
  declare function normalizePlugin(plugin: NuxtPlugin | string): NuxtPlugin;
334
363
  /**
335
- * Registers a nuxt plugin and to the plugins array.
336
- *
337
- * Note: You can use mode or .client and .server modifiers with fileName option
338
- * to use plugin only in client or server side.
339
- *
340
- * Note: By default plugin is prepended to the plugins array. You can use second argument to append (push) instead.
341
- * @example
342
- * ```js
343
- * import { createResolver } from '@nuxt/kit'
344
- * const resolver = createResolver(import.meta.url)
345
- *
346
- * addPlugin({
347
- * src: resolver.resolve('templates/foo.js'),
348
- * filename: 'foo.server.js' // [optional] only include in server bundle
349
- * })
350
- * ```
351
- */
364
+ * Registers a nuxt plugin and to the plugins array.
365
+ *
366
+ * Note: You can use mode or .client and .server modifiers with fileName option
367
+ * to use plugin only in client or server side.
368
+ *
369
+ * Note: By default plugin is prepended to the plugins array. You can use second argument to append (push) instead.
370
+ * @example
371
+ * ```js
372
+ * import { createResolver } from '@nuxt/kit'
373
+ * const resolver = createResolver(import.meta.url)
374
+ *
375
+ * addPlugin({
376
+ * src: resolver.resolve('templates/foo.js'),
377
+ * filename: 'foo.server.js' // [optional] only include in server bundle
378
+ * })
379
+ * ```
380
+ */
352
381
  interface AddPluginOptions {
353
- append?: boolean;
382
+ append?: boolean;
354
383
  }
355
384
  declare function addPlugin(_plugin: NuxtPlugin | string, opts?: AddPluginOptions): NuxtPlugin;
356
385
  /**
357
- * Adds a template and registers as a nuxt plugin.
358
- */
386
+ * Adds a template and registers as a nuxt plugin.
387
+ */
359
388
  declare function addPluginTemplate(plugin: NuxtPluginTemplate | string, opts?: AddPluginOptions): NuxtPlugin;
360
-
389
+ //#endregion
390
+ //#region src/resolve.d.ts
361
391
  interface ResolvePathOptions {
362
- /** Base for resolving paths from. Default is Nuxt rootDir. */
363
- cwd?: string;
364
- /** An object of aliases. Default is Nuxt configured aliases. */
365
- alias?: Record<string, string>;
366
- /**
367
- * The file extensions to try.
368
- * Default is Nuxt configured extensions.
369
- *
370
- * Isn't considered when `type` is set to `'dir'`.
371
- */
372
- extensions?: string[];
373
- /**
374
- * Whether to resolve files that exist in the Nuxt VFS (for example, as a Nuxt template).
375
- * @default false
376
- */
377
- virtual?: boolean;
378
- /**
379
- * Whether to fallback to the original path if the resolved path does not exist instead of returning the normalized input path.
380
- * @default false
381
- */
382
- fallbackToOriginal?: boolean;
383
- /**
384
- * The type of the path to be resolved.
385
- * @default 'file'
386
- */
387
- type?: PathType;
392
+ /** Base for resolving paths from. Default is Nuxt rootDir. */
393
+ cwd?: string;
394
+ /** An object of aliases. Default is Nuxt configured aliases. */
395
+ alias?: Record<string, string>;
396
+ /**
397
+ * The file extensions to try.
398
+ * Default is Nuxt configured extensions.
399
+ *
400
+ * Isn't considered when `type` is set to `'dir'`.
401
+ */
402
+ extensions?: string[];
403
+ /**
404
+ * Whether to resolve files that exist in the Nuxt VFS (for example, as a Nuxt template).
405
+ * @default false
406
+ */
407
+ virtual?: boolean;
408
+ /**
409
+ * Whether to fallback to the original path if the resolved path does not exist instead of returning the normalized input path.
410
+ * @default false
411
+ */
412
+ fallbackToOriginal?: boolean;
413
+ /**
414
+ * The type of the path to be resolved.
415
+ * @default 'file'
416
+ */
417
+ type?: PathType;
388
418
  }
389
419
  /**
390
- * Resolve the full path to a file or a directory (based on the provided type), respecting Nuxt alias and extensions options.
391
- *
392
- * If a path cannot be resolved, normalized input will be returned unless the `fallbackToOriginal` option is set to `true`,
393
- * in which case the original input path will be returned.
394
- */
420
+ * Resolve the full path to a file or a directory (based on the provided type), respecting Nuxt alias and extensions options.
421
+ *
422
+ * If a path cannot be resolved, normalized input will be returned unless the `fallbackToOriginal` option is set to `true`,
423
+ * in which case the original input path will be returned.
424
+ */
395
425
  declare function resolvePath(path: string, opts?: ResolvePathOptions): Promise<string>;
396
426
  /**
397
- * Try to resolve first existing file in paths
398
- */
427
+ * Try to resolve first existing file in paths
428
+ */
399
429
  declare function findPath(paths: string | string[], opts?: ResolvePathOptions, pathType?: PathType): Promise<string | null>;
400
430
  /**
401
- * Resolve path aliases respecting Nuxt alias options
402
- */
431
+ * Resolve path aliases respecting Nuxt alias options
432
+ */
403
433
  declare function resolveAlias(path: string, alias?: Record<string, string>): string;
404
434
  interface Resolver {
405
- resolve(...path: string[]): string;
406
- resolvePath(path: string, opts?: ResolvePathOptions): Promise<string>;
435
+ resolve(...path: string[]): string;
436
+ resolvePath(path: string, opts?: ResolvePathOptions): Promise<string>;
407
437
  }
408
438
  /**
409
- * Create a relative resolver
410
- */
439
+ * Create a relative resolver
440
+ */
411
441
  declare function createResolver(base: string | URL): Resolver;
412
442
  declare function resolveNuxtModule(base: string, paths: string[]): Promise<string[]>;
413
- type PathType = 'file' | 'dir';
414
- /**
415
- * Resolve absolute file paths in the provided directory with respect to `.nuxtignore` and return them sorted.
416
- * @param path path to the directory to resolve files in
417
- * @param pattern glob pattern or an array of glob patterns to match files
418
- * @param opts options for globbing
419
- * @param opts.followSymbolicLinks whether to follow symbolic links, default is `true`
420
- * @param opts.ignore additional glob patterns to ignore
421
- * @returns sorted array of absolute file paths
422
- */
443
+ type PathType = "file" | "dir";
444
+ /**
445
+ * Resolve absolute file paths in the provided directory with respect to `.nuxtignore` and return them sorted.
446
+ * @param path path to the directory to resolve files in
447
+ * @param pattern glob pattern or an array of glob patterns to match files
448
+ * @param opts options for globbing
449
+ * @param opts.followSymbolicLinks whether to follow symbolic links, default is `true`
450
+ * @param opts.ignore additional glob patterns to ignore
451
+ * @returns sorted array of absolute file paths
452
+ */
423
453
  declare function resolveFiles(path: string, pattern: string | string[], opts?: {
424
- followSymbolicLinks?: boolean;
425
- ignore?: GlobOptions['ignore'];
454
+ followSymbolicLinks?: boolean;
455
+ ignore?: GlobOptions["ignore"];
426
456
  }): Promise<string[]>;
427
-
457
+ //#endregion
458
+ //#region src/nitro.d.ts
428
459
  /**
429
- * Adds a nitro server handler
430
- *
431
- */
460
+ * Adds a nitro server handler
461
+ *
462
+ */
432
463
  declare function addServerHandler(handler: NitroEventHandler): void;
433
464
  /**
434
- * Adds a nitro server handler for development-only
435
- *
436
- */
465
+ * Adds a nitro server handler for development-only
466
+ *
467
+ */
437
468
  declare function addDevServerHandler(handler: NitroDevEventHandler): void;
438
469
  /**
439
- * Adds a Nitro plugin
440
- */
470
+ * Adds a Nitro plugin
471
+ */
441
472
  declare function addServerPlugin(plugin: string): void;
442
473
  /**
443
- * Adds routes to be prerendered
444
- */
474
+ * Adds routes to be prerendered
475
+ */
445
476
  declare function addPrerenderRoutes(routes: string | string[]): void;
446
477
  /**
447
- * Access to the Nitro instance
448
- *
449
- * **Note:** You can call `useNitro()` only after `ready` hook.
450
- *
451
- * **Note:** Changes to the Nitro instance configuration are not applied.
452
- * @example
453
- *
454
- * ```ts
455
- * nuxt.hook('ready', () => {
456
- * console.log(useNitro())
457
- * })
458
- * ```
459
- */
478
+ * Access to the Nitro instance
479
+ *
480
+ * **Note:** You can call `useNitro()` only after `ready` hook.
481
+ *
482
+ * **Note:** Changes to the Nitro instance configuration are not applied.
483
+ * @example
484
+ *
485
+ * ```ts
486
+ * nuxt.hook('ready', () => {
487
+ * console.log(useNitro())
488
+ * })
489
+ * ```
490
+ */
460
491
  declare function useNitro(): Nitro;
461
492
  /**
462
- * Add server imports to be auto-imported by Nitro
463
- */
493
+ * Add server imports to be auto-imported by Nitro
494
+ */
464
495
  declare function addServerImports(imports: Import | Import[]): void;
465
496
  /**
466
- * Add directories to be scanned for auto-imports by Nitro
467
- */
497
+ * Add directories to be scanned for auto-imports by Nitro
498
+ */
468
499
  declare function addServerImportsDir(dirs: string | string[], opts?: {
469
- prepend?: boolean;
500
+ prepend?: boolean;
470
501
  }): void;
471
502
  /**
472
- * Add directories to be scanned by Nitro. It will check for subdirectories,
473
- * which will be registered just like the `~/server` folder is.
474
- */
503
+ * Add directories to be scanned by Nitro. It will check for subdirectories,
504
+ * which will be registered just like the `~/server` folder is.
505
+ */
475
506
  declare function addServerScanDir(dirs: string | string[], opts?: {
476
- prepend?: boolean;
507
+ prepend?: boolean;
477
508
  }): void;
478
-
509
+ //#endregion
510
+ //#region src/template.d.ts
479
511
  /**
480
- * Renders given template during build into the virtual file system (and optionally to disk in the project `buildDir`)
481
- */
512
+ * Renders given template during build into the virtual file system (and optionally to disk in the project `buildDir`)
513
+ */
482
514
  declare function addTemplate<T>(_template: NuxtTemplate<T> | string): ResolvedNuxtTemplate<T>;
483
515
  /**
484
- * Adds a virtual file that can be used within the Nuxt Nitro server build.
485
- */
516
+ * Adds a virtual file that can be used within the Nuxt Nitro server build.
517
+ */
486
518
  declare function addServerTemplate(template: NuxtServerTemplate): NuxtServerTemplate;
487
519
  /**
488
- * Renders given types during build to disk in the project `buildDir`
489
- * and register them as types.
490
- *
491
- * You can pass a second context object to specify in which context the type should be added.
492
- *
493
- * If no context object is passed, then it will only be added to the nuxt context.
494
- */
520
+ * Renders given types during build to disk in the project `buildDir`
521
+ * and register them as types.
522
+ *
523
+ * You can pass a second context object to specify in which context the type should be added.
524
+ *
525
+ * If no context object is passed, then it will only be added to the nuxt context.
526
+ */
495
527
  declare function addTypeTemplate<T>(_template: NuxtTypeTemplate<T>, context?: {
496
- nitro?: boolean;
497
- nuxt?: boolean;
498
- node?: boolean;
499
- shared?: boolean;
528
+ nitro?: boolean;
529
+ nuxt?: boolean;
530
+ node?: boolean;
531
+ shared?: boolean;
500
532
  }): ResolvedNuxtTemplate<T>;
501
533
  /**
502
- * Normalize a nuxt template object
503
- */
534
+ * Normalize a nuxt template object
535
+ */
504
536
  declare function normalizeTemplate<T>(template: NuxtTemplate<T> | string, buildDir?: string): ResolvedNuxtTemplate<T>;
505
537
  /**
506
- * Trigger rebuilding Nuxt templates
507
- *
508
- * You can pass a filter within the options to selectively regenerate a subset of templates.
509
- */
538
+ * Trigger rebuilding Nuxt templates
539
+ *
540
+ * You can pass a filter within the options to selectively regenerate a subset of templates.
541
+ */
510
542
  declare function updateTemplates(options?: {
511
- filter?: (template: ResolvedNuxtTemplate<any>) => boolean;
512
- }): Promise<any>;
543
+ filter?: (template: ResolvedNuxtTemplate<any>) => boolean;
544
+ }): Promise<void>;
513
545
  declare function writeTypes(nuxt: Nuxt): Promise<void>;
514
-
515
- declare const logger: consola.ConsolaInstance;
516
- declare function useLogger(tag?: string, options?: Partial<ConsolaOptions>): consola.ConsolaInstance;
517
-
546
+ //#endregion
547
+ //#region src/logger.d.ts
548
+ declare const logger: ConsolaInstance;
549
+ declare function useLogger(tag?: string, options?: Partial<ConsolaOptions>): ConsolaInstance;
550
+ //#endregion
551
+ //#region src/internal/esm.d.ts
518
552
  interface ResolveModuleOptions {
519
- /** @deprecated use `url` with URLs pointing at a file - never a directory */
520
- paths?: string | string[];
521
- url?: URL | URL[];
522
- /** @default ['.js', '.mjs', '.cjs', '.ts', '.mts', '.cts'] */
523
- extensions?: string[];
553
+ /** @deprecated use `url` with URLs pointing at a file - never a directory */
554
+ paths?: string | string[];
555
+ url?: URL | URL[];
556
+ /** @default ['.js', '.mjs', '.cjs', '.ts', '.mts', '.cts'] */
557
+ extensions?: string[];
524
558
  }
525
559
  declare function directoryToURL(dir: string): URL;
526
560
  /**
527
- * Resolve a module from a given root path using an algorithm patterned on
528
- * the upcoming `import.meta.resolve`. It returns a file URL
529
- *
530
- * @internal
531
- */
561
+ * Resolve a module from a given root path using an algorithm patterned on
562
+ * the upcoming `import.meta.resolve`. It returns a file URL
563
+ *
564
+ * @internal
565
+ */
532
566
  declare function tryResolveModule(id: string, url: URL | URL[]): Promise<string | undefined>;
533
567
  /** @deprecated pass URLs pointing at files */
534
568
  declare function tryResolveModule(id: string, url: string | string[]): Promise<string | undefined>;
535
569
  declare function resolveModule(id: string, options?: ResolveModuleOptions): string;
536
570
  interface ImportModuleOptions extends ResolveModuleOptions {
537
- /** Automatically de-default the result of requiring the module. */
538
- interopDefault?: boolean;
571
+ /** Automatically de-default the result of requiring the module. */
572
+ interopDefault?: boolean;
539
573
  }
540
574
  declare function importModule<T = unknown>(id: string, opts?: ImportModuleOptions): Promise<T>;
541
575
  declare function tryImportModule<T = unknown>(id: string, opts?: ImportModuleOptions): Promise<T | undefined> | undefined;
542
576
  /**
543
- * @deprecated Please use `importModule` instead.
544
- */
577
+ * @deprecated Please use `importModule` instead.
578
+ */
545
579
  declare function requireModule<T = unknown>(id: string, opts?: ImportModuleOptions): T;
546
580
  /**
547
- * @deprecated Please use `tryImportModule` instead.
548
- */
581
+ * @deprecated Please use `tryImportModule` instead.
582
+ */
549
583
  declare function tryRequireModule<T = unknown>(id: string, opts?: ImportModuleOptions): T | undefined;
550
-
551
- export { addBuildPlugin, addComponent, addComponentExports, addComponentsDir, addDevServerHandler, addImports, addImportsDir, addImportsSources, addLayout, addPlugin, addPluginTemplate, addPrerenderRoutes, addRouteMiddleware, addRspackPlugin, addServerHandler, addServerImports, addServerImportsDir, addServerPlugin, addServerScanDir, addServerTemplate, addTemplate, addTypeTemplate, addVitePlugin, addWebpackPlugin, assertNuxtCompatibility, buildNuxt, checkNuxtCompatibility, createIsIgnored, createResolver, defineNuxtModule, directoryToURL, extendNuxtSchema, extendPages, extendRouteRules, extendRspackConfig, extendViteConfig, extendWebpackConfig, findPath, getDirectory, getLayerDirectories, getNuxtCtx, getNuxtModuleVersion, getNuxtVersion, hasNuxtCompatibility, hasNuxtModule, hasNuxtModuleCompatibility, importModule, installModule, installModules, isIgnored, isNuxt2, isNuxt3, isNuxtMajorVersion, loadNuxt, loadNuxtConfig, loadNuxtModuleInstance, logger, normalizeModuleTranspilePath, normalizePlugin, normalizeSemanticVersion, normalizeTemplate, nuxtCtx, requireModule, resolveAlias, resolveFiles, resolveIgnorePatterns, resolveModule, resolveModuleWithOptions, resolveNuxtModule, resolvePath, runWithNuxtContext, setGlobalHead, tryImportModule, tryRequireModule, tryResolveModule, tryUseNuxt, updateRuntimeConfig, updateTemplates, useLogger, useNitro, useNuxt, useRuntimeConfig, writeTypes };
552
- export type { AddComponentOptions, AddPluginOptions, AddRouteMiddlewareOptions, ExtendConfigOptions, ExtendRouteRulesOptions, ExtendViteConfigOptions, ExtendWebpackConfigOptions, ImportModuleOptions, LayerDirectories, LoadNuxtConfigOptions, LoadNuxtOptions, ResolveModuleOptions, ResolvePathOptions, Resolver };
584
+ //#endregion
585
+ export { type AddComponentOptions, type AddPluginOptions, type AddRouteMiddlewareOptions, type ExtendConfigOptions, type ExtendRouteRulesOptions, type ExtendViteConfigOptions, type ExtendWebpackConfigOptions, type ImportModuleOptions, type LayerDirectories, type LoadNuxtConfigOptions, type LoadNuxtOptions, type NuxtMajorVersion, type ResolveModuleOptions, type ResolvePathOptions, type Resolver, addBuildPlugin, addComponent, addComponentExports, addComponentsDir, addDevServerHandler, addImports, addImportsDir, addImportsSources, addLayout, addPlugin, addPluginTemplate, addPrerenderRoutes, addRouteMiddleware, addRspackPlugin, addServerHandler, addServerImports, addServerImportsDir, addServerPlugin, addServerScanDir, addServerTemplate, addTemplate, addTypeTemplate, addVitePlugin, addWebpackPlugin, assertNuxtCompatibility, buildNuxt, checkNuxtCompatibility, createIsIgnored, createResolver, defineNuxtModule, directoryToURL, extendNuxtSchema, extendPages, extendRouteRules, extendRspackConfig, extendViteConfig, extendWebpackConfig, findPath, getDirectory, getLayerDirectories, getNuxtCtx, getNuxtModuleVersion, getNuxtVersion, hasNuxtCompatibility, hasNuxtModule, hasNuxtModuleCompatibility, importModule, installModule, installModules, isIgnored, isNuxt2, isNuxt3, isNuxtMajorVersion, loadNuxt, loadNuxtConfig, loadNuxtModuleInstance, logger, normalizeModuleTranspilePath, normalizePlugin, normalizeSemanticVersion, normalizeTemplate, nuxtCtx, requireModule, resolveAlias, resolveFiles, resolveIgnorePatterns, resolveModule, resolveModuleWithOptions, resolveNuxtModule, resolvePath, runWithNuxtContext, setGlobalHead, tryImportModule, tryRequireModule, tryResolveModule, tryUseNuxt, updateRuntimeConfig, updateTemplates, useLogger, useNitro, useNuxt, useRuntimeConfig, writeTypes };