I've created one npm package which accesses few API's running in the backend. The URL to access those api's are hardcoded in the package. Most of the times we need to change the URL to point to some another api (different version pointing different database). And we end up editing the code and update the URL and re-publish the npm package.
Our npm package code is in a private git repo. We are creating a pipeline which will auto-publish the package on check-in. We want to add the URL's as build variables which will be fetched during build pipeline and will be added as part of npm package before publishing.
Is there any way to do so? If yes what changes needs to be done in the azure pipeline process and in the actual code?