I have some node.js libraries that I package as modules and install by npm install --save
. This is a pain to debug, because I have to publish a module, then update to use the newer version.
I see on this SO question: how to specify local modules as npm package dependencies that I can specify my dependencies as paths, which is much better.
Is there a way I could create a debug environment that uses paths for mudule-loading, and then a release environment that will use the modules from npm?
In this case the 'release' is created by the command pkg -t win index.js
. i.e.
- I'd like to develop with relative paths to modules
- I'd like to 'switch' to using modules from npm without changing strings anywhere.
Then. If the above is possible, I would like to NOT import the module file to node_modules, but run it in place (I'm trying to take advantage of VS Code debugging)