L
L
lightalex2021-07-28 23:29:57
Node.js
lightalex, 2021-07-28 23:29:57

What is the correct way to bundle npm packages locally during development?

There is a main project. Packages are being developed for it. Lots of packages. Packages are dependent on other similar locally developed packages.
So far, the only simple way I know how to link packages with the main project and between themselves is to prescribe yarn linkand thereby create a link in node_modules to the directory of the included package. But this method is not very pleasant. He seems to be quite a crutch.
Share your experience, how do you think it is more optimal to develop such packages?

PS I'll clarify right away that pushing every change in a local project to git just to start the main project and check the package's performance is not very optimal :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Brezhnev, 2021-07-29
@vanchelo

https://github.com/lerna/lerna or https://docs.npmjs.com/cli/v7/using-npm/workspaces/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question