poi-plugin-babel-minify

Use babel-minify to minimize JavaScript.

Usage no npm install needed!

<script type="module">
  import poiPluginBabelMinify from 'https://cdn.skypack.dev/poi-plugin-babel-minify';
</script>

README

poi-plugin-babel-minify

Use babel-minify to minimize JavaScript.

Install

yarn add poi-plugin-babel-minify --dev

Usage

This plugin will replace UglifyjsPlugin with babel-minify-webpack-plugin for you:

// 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:

require('poi-plugin-babel-minify')(minifyOpts, pluginOpts)

License

MIT © EGOIST