Use [babel-minify](https://github.com/babel/babel-minify) to minimize JavaScript.
Use babel-minify to minimize JavaScript.
``bash`
yarn add @poi/plugin-babel-minify --dev
This plugin will replace UglifyjsPlugin with babel-minify-webpack-plugin for you:
`js`
// poi.config.js
module.exports = {
plugins: [
require('@poi/plugin-babel-minify')()
]
}
Then it will compress JS code when you run poi build.
It accepts the same options as which in babel-minify-webpack-plugin:
`js``
require('poi-plugin-babel-minify')(minifyOpts, pluginOpts)