Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 1.06 KB

README.md

File metadata and controls

43 lines (28 loc) · 1.06 KB

Notice: recommend to use terser-webpack-plugin, support uglify, esbuild, and swc. doc.

swc-webpack-plugin

npm npm ci David

Minify bundle with swc in webpack

Installation

$ npm i --save-dev @swc/core swc-webpack-plugin webpack

Usage

const { SWCMinifyPlugin } = require('swc-webpack-plugin');

module.exports = {
  ...,

  optimization: {
    minimize: true,
    minimizer: [new SWCMinifyPlugin()],
  },
};

Options

SWCMinifyPlugin

Supports all swc configuration

sync

Type: boolean

Run in sync mode