Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to minify JavaScript file in Visual Studio Code [closed]

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.

like image 759
Tom Schreck Avatar asked Aug 05 '16 17:08

Tom Schreck


People also ask

How do you minify a JavaScript file?

To minify JavaScript, try UglifyJS. The Closure Compiler is also very effective. You can create a build process that uses these tools to minify and rename the development files and save them to a production directory.

How do I minify my code?

Go to minifycode.com and click the CSS minifier tab. Then paste the CSS code into the input box and click the Minify CSS button. After the new minified code is generated, copy the code. Then go back to the css file of your website and replace the code with the new minified version.


1 Answers

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

like image 187
Supersharp Avatar answered Oct 07 '22 03:10

Supersharp