user3385829
user3385829

Reputation: 137

How do you deploy to Firebase without Firebase functions?

I experimented with firebase functions for the init part and it has created a folder for me. Now when I deploy each time it also picks up the functions folder. When I remove the functions folder I get an error, when deploying. How do I deploy everything but functions?

Upvotes: 5

Views: 4730

Answers (3)

Bang
Bang

Reputation: 1132

firebase deploy has a parameter --except . So to deploy everything except functions you can run:

firebase deploy --except functions

Upvotes: 10

MaryM
MaryM

Reputation: 172

Check to make sure that you have removed the implicit reference to the function in your index.js and then running firebase deploy should do the trick. If you want to explicitly delete the function completely, you can use the firebase functions:delete <myFunction> and then delete the functions folder. You can find more details in the doc here

Upvotes: 1

Renaud Tarnec
Renaud Tarnec

Reputation: 83048

You can use the only option/flag, for example firebase deploy --only hosting,storage, see the CLI doc.

You can also use deploy targets which "are short-name identifiers (that you define yourself) for Firebase resources in your Firebase project".

Upvotes: 3

Related Questions