how to minify JavaScript file in Visual Studio Code
As of now, there are some available extensions: for example Minify or JS & CSS Minifier
Note: You can find extensions on the VS Code Marketplace.
Or directly from VS Code by searching from the Extensions pane, on the left side (Ctrl + Shift + X).
Related videos on Youtube

Tom Schreck
I've been in the IT industry since 1996. I started out developing MS Access applications then started developing web based apps in 1997 using ColdFusion. I started developing .Net apps in 2005. I've added mobile development in 2010. I'm a very big proponent of MVC. I love working with jQuery, jQuery Mobile, and doing UI development. I've created a code generator using T4 templates for generating stored procs, views, C# code for repository, business library, and data contracts. I'm currently working for Solutia Consulting.
Updated on July 09, 2022Comments
-
Tom Schreck 3 months
Do you know of a plugin for Visual Studio Code that will minify a JS file? I'd like to minify a file as soon as it is saved.
-
Tom Schreck about 6 yearsI believe Web Essentials 2015 is for Visual Studio 2015, not for Visual Studio Code.
-
Tom Schreck about 6 yearsthanks for the reply. Are these for Visual Studio Code? They seem to be for Visual Studio 2015 or 2010, 2012
-
areve about 6 yearsYou are correct; sorry. I have not used Visual Studio Code. Another option would be to use "grunt" or "gulp" with a watcher... but that's not really an answer to the question.
-
Samir over 4 yearsMaj? You mean Shift?
-
Supersharp over 4 yearsYes shift @samirg
-
Samir over 4 yearsInteresting... so is that a typo or is that some inside joke I am not getting?
-
Samir over 4 yearsOh I just cracked it! I think! :-) Control my X! Is that it?
-
Supersharp over 4 yearsSorry, actually it's French: Maj for Majuscule (uppercase), the name of the [shift] key on a French keyboard... wekyo.com/wp-content/uploads/clavier-virtuel.jpg
-
Supersharp over 4 yearsI thought it was an international word :-/
-
Samir over 4 yearsWhoa! Let me grab onto something before I fall! :-) But that explains it then. I would probably not have guessed it. In fact, I did a web search for "French keyboard" to see what you call the different keys. But most of the images I looked at feature keyboards with either the up arrow or the up arrow and the word "Shift" printed on. Well now I know. Merci beaucoup!
-
Samir over 4 yearsLet's call it an inside joke! ;-)
-
Supersharp over 4 yearsYes very uncommon but it exists... an inadvertant inside joke. on my first computer the key had no name that's why i've never known how to call it: journaldulapin.com/wp-content/uploads/2016/05/DSC00496.jpg
-
Samir over 4 yearsLet us continue this discussion in chat.
-
Franklin Yu almost 4 yearsThis extension is no longer updated. Several feature requests and pull requests out there.