![]() ![]() This option is the most inconvenient method for collaborating with other developers, especially if you are not using a monorepo. This option is the most convenient method for local development.Ĭons: Other developers who work on these projects will have to go through specific steps to set it up. Pros: Any changes you make to the library project will be immediately available in the other local projects that depend on it. Note: The shared library can be maintained in a separate repository or the same repository as your other projects (a.k.a, monorepo). Once you've moved your shared code into a separate project, link the project as a dependency using npm link. This project will have its own package.json file. The first step across all the following options is to move your code into a separate Node.js project. There are at least three solutions, and they all have tradeoffs between convenience and portability. ![]() ![]() A friend recently asked me about splitting some of their Node.js application into a shared library to be used across multiple projects. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |