mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
refactor: rename options.layers
to options._extends
(#3109)
This commit is contained in:
parent
29171bd105
commit
c9c0171b2d
@ -37,8 +37,7 @@ export async function loadNuxtConfig (opts: LoadNuxtConfigOptions): Promise<Nuxt
|
||||
|
||||
nuxtConfig._nuxtConfigFile = configFile
|
||||
nuxtConfig._nuxtConfigFiles = [configFile]
|
||||
|
||||
nuxtConfig.layers = layers
|
||||
nuxtConfig._extends = layers
|
||||
|
||||
// Resolve and apply defaults
|
||||
return applyDefaults(NuxtConfigSchema, nuxtConfig) as NuxtOptions
|
||||
|
@ -1,16 +1,15 @@
|
||||
import { ConfigSchema } from '../../schema/config'
|
||||
import type { ResolvedConfig } from 'c12'
|
||||
|
||||
/** Normalized Nuxt options available as `nuxt.options.*` */
|
||||
export interface NuxtOptions extends ConfigSchema {
|
||||
layers: ResolvedConfig<NuxtOptions>[]
|
||||
}
|
||||
|
||||
type DeepPartial<T> = T extends Record<string, any> ? { [P in keyof T]?: DeepPartial<T[P]> | T[P] } : T
|
||||
|
||||
/** User configuration in `nuxt.config` file */
|
||||
export interface NuxtConfig extends DeepPartial<ConfigSchema> { }
|
||||
|
||||
/** Normalized Nuxt options available as `nuxt.options.*` */
|
||||
export interface NuxtOptions extends ConfigSchema {
|
||||
_extends: ResolvedConfig<NuxtConfig>[]
|
||||
}
|
||||
|
||||
export interface PublicRuntimeConfig extends Record<string, any> { }
|
||||
export interface PrivateRuntimeConfig extends PublicRuntimeConfig { }
|
||||
|
Loading…
Reference in New Issue
Block a user