This plugin uses esbuild to minify your JavaScript.
To begin, you'll need to install esbuild-minimizer-webpack-plugin
npm install esbuild-minimizer-webpack-plugin --save-dev
Then add the plugin to your webpack config. For example:
webpack.config.js
const ESBuildPlugin = require('esbuild-minimizer-webpack-plugin').default;
module.exports = {
optimization: {
minimize: true,
minimizer: [
new ESBuildPlugin()
]
}
}
And run webpack
via your preferred method.
Type: Boolean|String
Default: true
Type: Boolean|Number
Default: true