如何在 Visual Studio Code 中缩小 JavaScript 文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38794484/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to minify JavaScript file in Visual Studio Code
提问by Tom Schreck
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.
你知道一个可以缩小 JS 文件的 Visual Studio Code 插件吗?我想在保存后立即缩小文件。
回答by Supersharp
As of now, there are some available extensions: for example Minifyor JS & CSS Minifier
截至目前,有一些可用的扩展:例如Minify或JS & CSS Minifier
Note:You can find extensions on the VS Code Marketplace.
注意:您可以在VS Code Marketplace上找到扩展。
Or directly from VS Code by searching from the Extensionspane, on the left side (Ctrl + Maj + X).
或者直接从 VS Code 通过从左侧的扩展窗格搜索(Ctrl + Maj + X)。
回答by areve
Have a look at Web Essentials 2015, it does this and a lot more.
看看Web Essentials 2015,它可以做到这一点以及更多。