vscode怎么压缩js代码


当前第2页 返回上一页

(可选)在已存在匹配的缩小文件(和/或目录)时,在保存时运行minify。启用您的用户或工作空间设置。设置默认值如下所示:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

"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[a-z]{3,}$" ],

    "decodeEntities": false,

    "html5": true,

    "ignoreCustomComments": [ "^!" ],

    "ignoreCustomFragments": ["<%[\\s\\S]*?%>", "<\\?[\\s\\S]*?\\?>"],

    "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接受“ ${workspaceRoot}/ some / path”定义内部@import绝对根。

由于html-minifier还采用了clean-css和uglify-js,设置minifyJS或minifyCSS以true意志嵌入你为那些minifiers自动提供的设置。如果要使用一些其他方法,可以提供自己的设置作为对象。

PHP中文网,有大量免费的vscode入门教程,欢迎大家学习!

以上就是vscode怎么压缩js代码的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

vsCode怎么退出当前终端

提高前端开发效率的vsCode必备插件(分享)

如何修改vsCode字体大小

vsCode如何设置语言

vsCode如何预览md文件

vsCode显示不受支持怎么办

vsCode怎么变成中文版

怎么使用vsCode打开多个文件夹

vsCode如何写汉字

vsCode如何自动补全js代码

更多相关阅读请进入《vsCode》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...

    正在狠努力加载,请稍候...