New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 1.0.2 to 2.0.0

index.js

26

package.json
{
"name": "rollup-plugin-uglify",
"version": "1.0.2",
"version": "2.0.0",
"description": "Rollup plugin to minify generated bundle",
"main": "dist/rollup-plugin-uglify.js",
"module": "dist/rollup-plugin-uglify.es.js",
"jsnext:main": "dist/rollup-plugin-uglify.es.js",
"main": "index.js",
"files": [
"dist"
"index.js"
],
"scripts": {
"build": "rollup -c",
"pretest": "npm run build",
"test": "mocha test/*.js --compilers js:buble/register",
"prepublish": "npm test"
"test": "jest --coverage",
"prepublish": "yarn test"
},

@@ -29,15 +25,9 @@ "repository": {

"license": "MIT",
"bugs": {
"url": "https://github.com/TrySound/rollup-plugin-uglify/issues"
},
"homepage": "https://github.com/TrySound/rollup-plugin-uglify#readme",
"dependencies": {
"uglify-js": "^2.6.1"
"uglify-js": "^3.0.9"
},
"devDependencies": {
"buble": "^0.10.6",
"mocha": "^2.5.3",
"rollup": "^0.31.1",
"rollup-plugin-buble": "^0.10.0"
"jest": "^20.0.3",
"rollup": "^0.41.6"
}
}

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

rollup({
entry: 'main.js',
plugins: [
uglify()
]
entry: 'main.js',
plugins: [
uglify()
]
});

@@ -41,14 +41,14 @@ ```

[UglifyJS](https://github.com/mishoo/UglifyJS2), which this plugin is based on, does not support the ES2015 module syntax. Thus using this plugin with Rollup's default bundle format (`'es6'`) will not work and error out.
To work around this you can tell `rollup-plugin-uglify` to use the UglifyJS [harmony branch](https://github.com/mishoo/UglifyJS2/tree/harmony) by passing its `minify` function to minify your code.
[UglifyJS](https://github.com/mishoo/UglifyJS2), which this plugin is based on, does not support the ES2015 module syntax. Thus using this plugin with Rollup's default bundle format (`'es'`) will not work and error out.
To work around this you can tell `rollup-plugin-uglify` to use the UglifyJS [unstable es version](https://github.com/mishoo/UglifyJS2) by passing its `minify` function to minify your code.
```js
import { rollup } from 'rollup';
import uglify from 'rollup-plugin-uglify';
import { minify } from 'uglify-js-harmony';
import { minify } from 'uglify-es';
rollup({
entry: 'main.js',
plugins: [
uglify({}, minify)
]
entry: 'main.js',
plugins: [
uglify({}, minify)
]
});

@@ -59,3 +59,5 @@ ```

npm i -D uglify-js-harmony
```
npm i uglify-es -D
```

@@ -62,0 +64,0 @@ ## Examples

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