问题
I have done customization in a npm package
inside node_modules
folder. Now I want to deploy it on heroku. But what heroku does is It will see the package.json and install the fresh package.
So someone suggested me to provide the custom url for a npm package, So that Heroku will download the npm package from this custom url not from npm.
How can I achieve the same?
回答1:
You should fork this package, make customization on your fork and install your version as a project dependency npm install <git repo url>
- find package that you want to customise on github
- use fork button to fork it to your repositories
- make customization on this new repo created in step 2
- run
npm install
with url address to your repository
来源:https://stackoverflow.com/questions/55625458/how-to-give-a-custom-url-in-package-json-for-a-package