how to minify JavaScript file in Visual Studio Code

47,763

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).

Share:
47,763

Related videos on Youtube

Tom Schreck
Author by

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, 2022

Comments

  • Tom Schreck
    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
    Tom Schreck about 6 years
    I believe Web Essentials 2015 is for Visual Studio 2015, not for Visual Studio Code.
  • Tom Schreck
    Tom Schreck about 6 years
    thanks for the reply. Are these for Visual Studio Code? They seem to be for Visual Studio 2015 or 2010, 2012
  • areve about 6 years
    You 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
    Samir over 4 years
    Maj? You mean Shift?
  • Supersharp
    Supersharp over 4 years
    Yes shift @samirg
  • Samir
    Samir over 4 years
    Interesting... so is that a typo or is that some inside joke I am not getting?
  • Samir
    Samir over 4 years
    Oh I just cracked it! I think! :-) Control my X! Is that it?
  • Supersharp
    Supersharp over 4 years
    Sorry, 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
    Supersharp over 4 years
    I thought it was an international word :-/
  • Samir
    Samir over 4 years
    Whoa! 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
    Samir over 4 years
    Let's call it an inside joke! ;-)
  • Supersharp
    Supersharp over 4 years
    Yes 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
    Samir over 4 years
  • Franklin Yu
    Franklin Yu almost 4 years
    This extension is no longer updated. Several feature requests and pull requests out there.

Related