Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/morrislaptop/poi-preset-uglify-es
Use uglify-es instead of uglify-js
https://github.com/morrislaptop/poi-preset-uglify-es
Last synced: about 1 month ago
JSON representation
Use uglify-es instead of uglify-js
- Host: GitHub
- URL: https://github.com/morrislaptop/poi-preset-uglify-es
- Owner: morrislaptop
- License: mit
- Created: 2018-02-07T16:35:10.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-07T17:07:36.000Z (almost 7 years ago)
- Last Synced: 2024-11-05T11:42:37.938Z (about 2 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/poi-preset-uglify-es
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-poi - poi-preset-uglify-es - Use the next version of UglifyJS (uglify-es) to minify your ES6+ files. (Presets)
README
# poi-preset-uglify-es
Use [uglify-es](https://github.com/mishoo/UglifyJS2/tree/harmony) to minimize JavaScript.
## Install
```bash
yarn add poi-preset-uglify-es --dev
```## Usage
This preset will replace UglifyjsPlugin with the latest [uglifyjs-webpack-plugin](https://github.com/webpack-contrib/uglifyjs-webpack-plugin) for you:
```js
// poi.config.js
module.exports = {
presets: [
require('poi-preset-uglify-es')()
]
}
```Then it will compress JS code when you run `poi build`.
It accepts the same options as which in [uglifyjs-webpack-plugin](https://github.com/webpack-contrib/uglifyjs-webpack-plugin#options):
```js
require('poi-preset-uglify-es')({ parallel: true, uglifyOptions: { warnings: false }})
```## License
MIT © [EGOIST](https://github.com/morrislaptop)