Reputation: 1001
I hit following problem working with firebase functions, I split functionality into different files, few of them have only custom utility logic.
The thing is that with firebase CLI I only can upload separate functions with :
firebase deploy --only functions:someFunction
But in this case the utility file which function someFunction
uses does not get uploaded. To refresh logic in separate files I need to redeploy all the functions by executing :
firebase deploy functions
and I hit deployment limit just in few deploys.
Is there any way I can redeploy a separate file to the server?
UPD
By utility file I mean files that contain logic and used in functions. Say we have function someFunction
in the index.js that goes like this :
const commons = require('./commons');
exports.someFunction = function() {
common.sayHello();
}
In this case commons
is a plain javascript file (commons.js
) that has utility functions, other words - utility file.
exports.sayHello = function() {
console.log('hello!');
}
This is exactly the file I would like to redeploy separately.
Upvotes: 0
Views: 524
Reputation: 317958
It's not possible to upload only a single file when when deploying functions. The entire contents of the functions folder (except node_modules) is replaced for every function at every deployment, even if you are deploying just one function at a time.
Upvotes: 1