I'm trying to figure out of if there is a feature or convention I'm missing for referencing a js file from a node_module in the client html via script. For example, I have underscore installed via npm and use it on the server side, but also want to use underscore-min.js in the client. Right now i symlink the file into my expressjs static folder, but that seem hacky.
Is there an official or at least cleaner way?
You can try browserify and put all your js files (Node modules) in a folder, for more details checkout his awesome article:
http://substack.net/posts/24ab8c/browserify-browser-side-require-for-your-node-js
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With