I have two Firebase projects, and two service-accounts, so I am using (.env.dev, .env.prod)
I tried everything to import the service account path from .env.dev and .env.prod but nothing worked, I always have to comment and uncomment when deploying to a specific project, and it's painful and error-prone.
Need help !
// PROD
admin.initializeApp({
credential: admin.credential.cert("./src/service-account.json"),
storageBucket: "prod.storage.com"
});
// DEV
admin.initializeApp({
credential: admin.credential.cert("./src/service-account-dev.json"),
storageBucket: "dev.storage.com"
});