rollup-plugin-uglify
Advanced tools
Comparing version 1.0.2 to 2.0.0
{ | ||
"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 |
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
2
87
4423
4
14
2
1
+ Addeduglify-js@3.19.3(transitive)
- Removedalign-text@0.1.4(transitive)
- Removedcamelcase@1.2.1(transitive)
- Removedcenter-align@0.1.3(transitive)
- Removedcliui@2.1.0(transitive)
- Removeddecamelize@1.2.0(transitive)
- Removedis-buffer@1.1.6(transitive)
- Removedkind-of@3.2.2(transitive)
- Removedlazy-cache@1.0.4(transitive)
- Removedlongest@1.0.1(transitive)
- Removedrepeat-string@1.6.1(transitive)
- Removedright-align@0.1.3(transitive)
- Removedsource-map@0.5.7(transitive)
- Removeduglify-js@2.8.29(transitive)
- Removeduglify-to-browserify@1.0.2(transitive)
- Removedwindow-size@0.1.0(transitive)
- Removedwordwrap@0.0.2(transitive)
- Removedyargs@3.10.0(transitive)
Updateduglify-js@^3.0.9