Mangle nested classes and variables with uglifyjs

前端 未结 5 1840
礼貌的吻别
礼貌的吻别 2021-01-05 08:26

I use uglifyjs to minify a concatenated set of files, which works fine but not good enough. The built lib uses namespaces, so classes, functions and constants are stored in

5条回答
  •  孤街浪徒
    2021-01-05 09:24

    The latest release of uglify (today) has object property mangling, see v2.4.18. It also supports reserved files for excluding both object properties and variables that you don't want mangled. Check it out.

    Use the --mangle-props option and --reserved-file filename1.json filename2.json etc....

提交回复
热议问题