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