![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
fast-uglifyjs-plugin
Advanced tools
生产环境的构建,uglify过程占了70%左右的时间,是一个非常耗时的过程。相对于webpack原生UglifyJsPlugin,FastUglifyJsPlugin增加了多进程和缓存。多进程可以最大限度的利用多核cpu的计算能力,缓存可以按需编译,减少不必要的计算。以下是一组性能测试数据,FastUglifyJsPlugin的性能提升非常明显。
插件 | 耗时 |
---|---|
webpack.optimize.UglifyJsPlugin | 7.4 min |
FastUglifyJsPlugin without cache | 4.45 min |
FastUglifyJsPlugin with cache | 36 s |
测试样本:29 entry,2615 modules
测试环境:MacBook Pro,4核cpu,8g内存
npm i fast-uglifyjs-plugin --save
FastUglifyJsPlugin基于webpack.optimize.UglifyJsPlugin修改,用法和webpack.optimize.UglifyJsPlugin完全一样,只是增加了几个额外的配置参数。
var FastUglifyJsPlugin = require('fast-uglifyjs-plugin');
module.exports = {
entry: {...},
output: {...},
plugins: [new FastUglifyJsPlugin({
compress: {
warnings: false
},
// debug设为true可输出详细缓存使用信息:
// debug: true
// 默认开启缓存,提高uglify效率,关闭请使用:
// cache: false,
// 默认缓存路径为项目根目录,手动配置请使用:
// cacheFolder: path.resolve(__dirname, '.otherFolder')
})]
};
FAQs
hight performance uglify plugin for webpack
The npm package fast-uglifyjs-plugin receives a total of 29 weekly downloads. As such, fast-uglifyjs-plugin popularity was classified as not popular.
We found that fast-uglifyjs-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.