0

I have a public package, when I am developing in local machine, I want to use this package in local like this:

"rd-component": "file:../rd-component/rd-component-0.1.24.tgz",

using local package could make me change the pakcage more convenience. when I publish my project to porduction environmnet, I want to use this dependencies like this:

"rd-component": "0.1.24",

how to make the package.json automatically change like this? I have to edit the dependencies every time before I publish package to production environment right now. I have searching a component called penv but it stop update for years.

Dolphin
  • 29,069
  • 61
  • 260
  • 539
  • 1
    Look at [this thread](https://stackoverflow.com/questions/14381898/local-dependency-in-package-json) which uses links for local development. That way your package.json can stay the same but reference different packages. – Emiel Zuurbier May 01 '23 at 06:36

0 Answers0