mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +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) {
|
function getNuxtConfig (rootDir: string) {
|
||||||
try {
|
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) {
|
} catch (err) {
|
||||||
// TODO: Show error as warning if it is not 404
|
// TODO: Show error as warning if it is not 404
|
||||||
return {}
|
return {}
|
||||||
|
Loading…
Reference in New Issue
Block a user