
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
rollup-plugin-minify-es
Advanced tools
Rollup plugin to minify generated format into new minified file, with source maps, using uglify-es.
Rollup plugin to minify generated bundle.
npm i rollup-plugin-minify-es -D
import { rollup } from 'rollup';
import minify from 'rollup-plugin-minify-es';
rollup({
entry: 'main.js',
plugins: [
minify()
]
});
minify(options)
options
– default: {}
, type: object
. UglifyJS API options
minifier
– default: require('minify-js').minify
, type: function
. Module to use as a minifier. You can use other versions (or forks) of UglifyJS instead default one.
import { rollup } from 'rollup';
import minify from 'rollup-plugin-minify';
import { minify } from 'minify-es';
rollup({
entry: 'main.js',
plugins: [
minify({}, minify)
]
});
If you'd like to preserve comments (for licensing for example), then you can specify a function to do this like so:
minify({
output: {
comments: function(node, comment) {
var text = comment.value;
var type = comment.type;
if (type == "comment2") {
// multiline comment
return /@preserve|@license|@cc_on/i.test(text);
}
}
}
});
See UglifyJS documentation for further reference.
MIT
FAQs
Rollup plugin to minify generated format into new minified file, with source maps, using uglify-es.
The npm package rollup-plugin-minify-es receives a total of 297 weekly downloads. As such, rollup-plugin-minify-es popularity was classified as not popular.
We found that rollup-plugin-minify-es demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.