Skip to content

Commit

Permalink
refactor: read .nuxt/dist/nuxtrc instead
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed May 12, 2021
1 parent a897837 commit 5bba20a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/config/src/load.js
Expand Up @@ -88,13 +88,13 @@ export async function loadNuxtConfig ({
}

// Load Combine configs
// Priority: configOverrides > nuxtConfig > .nuxt/dist/.nuxtrc > .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(
configOverrides,
options,
!dev ? rc.read({ name: '.nuxtrc', dir: path.resolve(buildDir, 'dist') }) : {},
!dev ? rc.read({ name: 'nuxtrc', dir: path.resolve(buildDir, 'dist') }) : {},
rc.read({ name: '.nuxtrc', dir: options.rootDir }),
rc.readUser('.nuxtrc')
)
Expand Down

0 comments on commit 5bba20a

Please sign in to comment.