0.1.0-experimental • Published 12 months ago

@cherry-soda/minifier v0.1.0-experimental

Weekly downloads
-
License
-
Repository
github
Last release
12 months ago

Cherry-soda Minifier

A minifier for made for esbuild, used in cherry-soda.

Install with npm i @cherry-soda/minifier

This package provides multiple plugins:

JS Minifier

Largely adopted from terser-webpack-plugin. Refer to the project's docs for details on the options.

parallel is not implemented, yet

Use like this:

import esbuild from 'esbuild'
import {jsMinifierPlugin} from '@cherry-soda/minifier'

esbuild.build({
    // ...
    plugins: [
        // ...
        jsMinifierPlugin({
            // ...
        })
        // ...
    ],
    // ...
})

CSS Minifier

Largely adopted from css-minimizer-webpack-plugin. Refer to the project's docs for details on the options.

parallel is not implemented, yet

Use like this:

import esbuild from 'esbuild'
import {cssMinifierPlugin} from '@cherry-soda/minifier'

esbuild.build({
    // ...
    plugins: [
        // ...
        cssMinifierPlugin({
            // ...
        })
        // ...
    ],
    // ...
})