In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the method of vscode compression js code, the article is very detailed, has a certain reference value, interested friends must read it!
How vscode compresses js code:
1. Search for "minify" in the expansion store, install, and reload after the installation is successful.
2. Use: F1 to run the file reducer Minify to compress js code.
Introduction to how to use Minify:
Shrink your js,css and html files to save transfer bandwidth. Call each reducer directly to allow the settings to be passed:
JS: uglify-js v2.7.4
CSS: clean-css v3.4.21
HTML: html-minifier v3.2.2
Use F1 to run the file reducer Minify.
The folder containing Javascript and CSS files can be reduced to a file Minify Directory using F1, {dirname} .min. [css | js]. It is acceptable to reduce one directory for Javascript and CSS.
(optional) run minify on save when a matching zoom-out file (and / or directory) already exists. Enable your user or workspace settings. Set the default values as follows:
Minify.minifyExistingOnSave: false, minify.js: {"mangle": true, "compress": {"sequences": true, "properties": true, "dead_code": true, "drop_debugger": true, "unsafe": false, "unsafe_comps": false "conditionals": true, "comparisons": true, "evaluate": true, "booleans": true, "loops": true, "unused": true, "hoist_funs": true, "keep_fargs": true, "keep_fnames": false "hoist_vars": false, "if_return": true, "join_vars": true, "collapse_vars": false, "reduce_vars": false, "side_effects": true, "pure_getters": false, "pure_funcs": null "negate_iife": false, "drop_console": false, "passes": 1, "global_defs": {}}, "output": {ascii_only ": false," inline_script ": false," max_line_len ": 32000 "braces": false, "semicolons": true, "comments": false, "shebang": true, "preamble": null, "quote_style": "best"}, "minify.css": {"advanced": true, "aggressiveMerging": true "compatibility": "*", "inliner": {}, "keepBreaks": false, "keepSpecialComments": "*", "mediaMerging": true, "processImport": true, "processImportFrom": ["all"], "rebase": true, "restructuring": true, "root": "${workspaceRoot}", "roundingPrecision": 2 "semanticMerging": false, "shorthandCompacting": true}, "minify.html": {"caseSensitive": false, "collapseBooleanAttributes": true, "collapseWhitespace": true, "conservativeCollapse": false, "customAttrAssign": [], "customAttrCollapse": "," customAttrSurround ": []," customEventAttributes ": [" ^ on [amurz] {3,} $"] "decodeEntities": false, "html5": true, "ignoreCustomComments": ["^!"], "ignoreCustomFragments": ["", "]," includeAutoGeneratedTags ": true," keepClosingSlash ": false," maxLineLength ": false," minifyCSS ": true, / / uses minify.css settings if true" minifyJS ": true / uses minify.js settings if true "minifyURLs": false, "preserveLineBreaks": false, "preventAttributesEscaping": false, "processConditionalComments": false, "processScripts": [], "quoteCharacter": "\", "removeAttributeQuotes": false, "removeComments": false, "removeEmptyAttributes": false, "removeEmptyElements": false, "removeOptionalTags": false "removeRedundantAttributes": false, "removeScriptTypeAttributes": false, "removeStyleLinkTypeAttributes": false, "sortAttributes": false, "sortClassName": false, "useShortDoctype": false}
Minifiy.css.root accepts the @ import absolute root inside the "${workspaceRoot} / some / path" definition.
Since html-minifier also uses clean-css and uglify-js, set minifyJS or minifyCSS to embed the settings you provide automatically for those minifiers with true will. If you want to use some other methods, you can provide your own settings as objects.
These are all the contents of this article entitled "vscode ways to compress js Code". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.