mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(nuxi): stub defineNuxtConfig
for nuxi info
(#7728)
This commit is contained in:
parent
230af9c186
commit
084188e7de
@ -119,7 +119,10 @@ function normalizeConfigModule (module: NuxtModule | string | null | undefined,
|
||||
|
||||
function getNuxtConfig (rootDir: string) {
|
||||
try {
|
||||
return jiti(rootDir, { interopDefault: true, esmResolve: true })('./nuxt.config')
|
||||
(globalThis as any).defineNuxtConfig = (c: any) => c
|
||||
const result = jiti(rootDir, { interopDefault: true, esmResolve: true })('./nuxt.config')
|
||||
delete (globalThis as any).defineNuxtConfig
|
||||
return result
|
||||
} catch (err) {
|
||||
// TODO: Show error as warning if it is not 404
|
||||
return {}
|
||||
|
Loading…
Reference in New Issue
Block a user