Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rollup-plugin-uglify

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-uglify - npm Package Compare versions

Comparing version 3.0.0 to 4.0.0

14

index.js

@@ -1,7 +0,5 @@

const minify = require("uglify-es").minify;
const { codeFrameColumns } = require("@babel/code-frame");
const { minify } = require("uglify-js");
function uglify(userOptions, minifier) {
if (minifier === undefined) {
minifier = minify;
}
function uglify(userOptions, minifier = minify) {
const options = Object.assign({ sourceMap: true }, userOptions);

@@ -15,2 +13,6 @@

if (result.error) {
const { message, line, col: column } = result.error;
console.error(
codeFrameColumns(code, { start: { line, column } }, { message })
);
throw result.error;

@@ -23,2 +25,2 @@ }

module.exports = uglify;
exports.uglify = uglify;
{
"name": "rollup-plugin-uglify",
"version": "3.0.0",
"version": "4.0.0",
"description": "Rollup plugin to minify generated bundle",

@@ -26,9 +26,14 @@ "main": "index.js",

"dependencies": {
"uglify-es": "^3.3.7"
"@babel/code-frame": "^7.0.0-beta.47",
"uglify-js": "^3.3.25"
},
"devDependencies": {
"jest": "^22.1.4",
"prettier": "^1.10.2",
"rollup": "^0.54.1"
"@babel/core": "^7.0.0-beta.47",
"@babel/preset-env": "^7.0.0-beta.47",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^22.4.4",
"jest": "^22.4.4",
"prettier": "^1.12.1",
"rollup": "^0.59.1"
}
}

@@ -18,3 +18,3 @@ # rollup-plugin-uglify [![Travis Build Status][travis-img]][travis]

import { rollup } from 'rollup';
import uglify from 'rollup-plugin-uglify';
import { uglify } from 'rollup-plugin-uglify';

@@ -35,5 +35,5 @@ rollup({

`options` – default: `{}`, type: `object`. [UglifyJS API options](https://github.com/mishoo/UglifyJS2#api-reference)
`options` – default: `{}`, type: `object`. [UglifyJS API options](https://github.com/mishoo/UglifyJS2/blob/master/README.md#minify-options)
`minifier` – default: `require('uglify-es').minify`, type: `function`. Module to use as a minifier. You can use other versions (or forks) of UglifyJS instead default one.
`minifier` – default: `require('uglify-js').minify`, type: `function`. Module to use as a minifier. You can use other versions (or forks) of UglifyJS instead default one.

@@ -71,3 +71,3 @@ ## Examples

See [UglifyJS documentation](https://github.com/mishoo/UglifyJS2#keeping-comments-in-the-output) for further reference.
See [UglifyJS documentation](https://github.com/mishoo/UglifyJS2/blob/master/README.md) for further reference.

@@ -74,0 +74,0 @@ # License

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc