0

I have developed a library using angular2/webpack which is dependent on some core library(pure typescript/webpack). I have references to this core library using relative path "../../" in my code. This is good for building and getting the latest code from the core library. However I think this may not work during npm publish. I want to know what is the best way to work this out. For time being, whenever I want to publish my library, I just change the references from relative path to the actual npm published version. But this is tedious since I have to revert it back to the relative path after I am done publishing. I would really appreciate any help here.

user911
  • 1,509
  • 6
  • 26
  • 52
  • I think what you are searching for is [npm link](https://docs.npmjs.com/cli/link) This allows you to link a published npm package to a lokal version. I hope the documentation of npm link should be enough to answer your question. – DaSch May 09 '18 at 06:34
  • I don't know if anybody can see the edited deleted answer. But it contains a detailed description how to use npm link in the described case. Procedure of deletion of answers is a bit strange for me. But nevermind. I'm not even sure if there is anything more possible than pointing to npm link for the answer :D – DaSch May 09 '18 at 11:08

0 Answers0