I am writing a NodeJS application and I am confused on what software/workflow to use to minify my client side Javascript for production. I realize that there are command line tools that can do this, but what does the workflow look like?

In other words, if I have a view that links to main.js during development, do I have to maintain two copies of this file i.e. one that is minified and one that is not?

I cannot imagine having to minify everything and change the script tags to point to the minified files in all of my views. I should also add that I am more concerned with obfuscation in production than I am with the speed of the requests. Why give potential hackers/thieves more information with all of my comments?

I would appreciate a recommendation on both the software to use and a typical workflow from dev to production.


1 Answer 1


I personally use GulpJS to done some task like minifying. It is easy to use and configure in nodeJS projects. there are plenty of these task runners like Grunt but if you are a web developer I recommend you to use webpack for this kind of stuff

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.