Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(nuxi): stub defineNuxtConfig for nuxi info (#7728)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Sep 22, 2022
1 parent 230af9c commit 084188e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/nuxi/src/commands/info.ts
Expand Up @@ -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 {}
Expand Down

0 comments on commit 084188e

Please sign in to comment.