Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道我是否可以以minify编程方式调用 main 函数。
minify
我能够运行compress中定义的相同代码,但是替换UglifyJS.CompressorwithUglifyJS.minify不起作用。
UglifyJS.Compressor
UglifyJS.minify
这是因为我想传递在 UglifyJS2 的 README 中定义的相同选项,而不是compress.
compress
请注意,我在 Nashorn 中运行代码,而不是在 Node.js 中,因此这类似于浏览器环境。
这是一项正在进行的工作:请参阅此问题和此 PR。