nitro icon indicating copy to clipboard operation
nitro copied to clipboard

[preset: firebase] firebase.json is generated even though it already exists

Open hecateball opened this issue 2 years ago • 1 comments

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

hecateball avatar Jun 23 '22 03:06 hecateball

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

hecateball avatar Jun 27 '22 02:06 hecateball

This behavior is patched in latest version and if config exists won't be overriden.

pi0 avatar May 16 '24 20:05 pi0