Do packages outside functions refresh on firebase deploy --only functions?

Viewed 33

Let's assume the following index.js on the Firebase's functions folder:

const data = require('./hosting/_data.js'); 

exports.functionA = functions.https.onRequest((request, response) => {

    response.status(200).send(data[html]);
    
});

exports.functionB = functions.https.onRequest((request, response) => {

    response.status(200).send(data[error]);
    
});

If I modify _data.js and deploy the changes using firebase deploy ---only hosting,functions:functionA, will both functions see the changes in _data.js? Or only functionA will be affected?

How does Firebase manage these situations?

1 Answers

If only functionA is deployed, only the container for functionA is rebuilt, so I'd expect only that function to get the new node_modules.

Related