> UglifyJS@v3 packaged for the browser.
npm install uglifyjs-browser> UglifyJS@v3 packaged for the browser.
I spent far too much time digging for this and just need something to minify javascript within a browser app. This module does exactly that.
Starting at v3, this package will mirror the major version of our underlying UglifyJS dependency. For example, v3.0.0 will use UglifyJS v3.X.X.
``js
const uglify = require('uglifyjs-browser')
const src =
(function () {
var foo = 'bar'
var baz = 'qux'
this.foo = foo + baz
})()
const { code, error } = uglify.minify(src)
if (error) {
throw error
}
console.log(code)
`
Run the following, then push a new tag:
```
yarn upgrade uglify-js
yarn build
vim package.json # bump version
git release
CircleCI will handle publishing to npm.
MIT