Share via

Azure static web apps - dependencies

Costin Boldisor-Buta 1 Reputation point
2020-08-28T14:28:01.563+00:00

Question about Azure Static Web Apps - how do we add dependencies to JavaScript Azure Functions used in the API?
For instance, I want to use the azure-storage library, which is available locally using npm.

Is there a file similar to requirements.txt (for Python Azure Functions) that we need to provide?

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.


2 answers

Sort by: Most helpful
  1. ChaitanyaNaykodi-MSFT 27,671 Reputation points Microsoft Employee Moderator
    2020-08-31T22:27:44.2+00:00

    Hello @Costin Boldisor-Buta ,

    You can use the package.json file to trigger an npm install in its folder during deployment as referenced her in the JavaScript developer guide for Azure Functions.
    Please let me know if there are any additional concerns or issues.

    Was this answer helpful?

    0 comments No comments

  2. Malleswara Reddy, G 1,631 Reputation points
    2020-08-28T14:46:42.337+00:00

    Hi,

    Have you tried to install the dependencies -
    https://learn.microsoft.com/en-us/azure/static-web-apps/publish-jekyll

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.