@cherry-soda/minifier
v0.1.0-experimental
Published
A minifier for made for [esbuild](https://esbuild.github.io), used in [cherry-soda](https://github.com/drinking-code/cherry-soda).
Downloads
3
Readme
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({
// ...
})
// ...
],
// ...
})