nitro
nitro copied to clipboard
[preset: firebase] firebase.json is generated even though it already exists
Environment
npm: 8.6.0 (reproduction requires npm7+) node: v16.11.0
nitro config (in nuxt.config.ts) :
nitro: { preset: 'firebase' }
Reproduction
https://github.com/hecateball/nitro-firebase
Describe the bug
When I'm using npm workspaces, nuxi build
doesn't find firebase.json in the root directory (./
) and generate one in Nuxt app root directory (./packages/nuxt-app/
)
In this case, Nitro doesn't need to generate firebase.json in Nuxt app root but just respect one in the root directory.
Additional context
No response
Logs
No response
FYI: here is the function to detect firebase.json used in the Firebase CLI https://github.com/firebase/firebase-tools/blob/master/src/detectProjectRoot.ts
This behavior is patched in latest version and if config exists won't be overriden.