mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
feat(config): support nuxtrc
in dist directory (#9280)
This commit is contained in:
parent
00aeff62e7
commit
186df335d9
@ -88,10 +88,13 @@ export async function loadNuxtConfig ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Load Combine configs
|
// Load Combine configs
|
||||||
// Priority: configOverrides > nuxtConfig > .nuxtrc > .nuxtrc (global)
|
// Priority: configOverrides > nuxtConfig > .nuxt/dist/nuxtrc > .nuxtrc > .nuxtrc (global)
|
||||||
|
const dev = configOverrides.dev ?? options.dev ?? configContext.dev
|
||||||
|
const buildDir = configOverrides.buildDir ?? options.buildDir ?? configContext.buildDir ?? '.nuxt'
|
||||||
options = defu(
|
options = defu(
|
||||||
configOverrides,
|
configOverrides,
|
||||||
options,
|
options,
|
||||||
|
!dev ? rc.read({ name: 'nuxtrc', dir: path.resolve(buildDir, 'dist') }) : {},
|
||||||
rc.read({ name: '.nuxtrc', dir: options.rootDir }),
|
rc.read({ name: '.nuxtrc', dir: options.rootDir }),
|
||||||
rc.readUser('.nuxtrc')
|
rc.readUser('.nuxtrc')
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user