Answer the question
In order to leave comments, you need to log in
How to auto-include npm packages for the current configuration of a node.js application?
I am making my own assembler for web page layout projects. To simplify support in the future, I want to make a plugin architecture. Namely: if you need to include CSS preprocessors, or PostCSS, or something else.
As a result, a natural question arises. You can link the parts together. What about dependencies in package.json?
Putting all possible dependencies into package.json at once is not an option. The excess must be cut off.
Each plugin naturally needs its own npm packages. When connecting the plugin, they must be added to package.json, and removed when disconnected. Or maybe there are ways from the application itself to call the installation of the necessary packages and check if they are installed at the current moment?
Tell me in which direction to dig, otherwise I googled, nothing suitable was found.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question