@luncheon/esbuild-plugin-gzip
v0.1.0
Published
Gzip and Brotli compression for esbuild
Downloads
2,302
Readme
esbuild-plugin-gzip
Gzip and Brotli compression for esbuild.
Installation
$ npm i -D esbuild @luncheon/esbuild-plugin-gzip
Usage Example
const esbuild = require('esbuild')
const gzipPlugin = require('@luncheon/esbuild-plugin-gzip')
esbuild.build({
entryPoints: ['src/app.ts'],
outdir: 'dist',
bundle: true,
minify: true,
write: false, // write must be false
plugins: [gzipPlugin()],
})
Options
gzipPlugin({
uncompressed: true,
gzip: true,
brotli: true,
onEnd: ({ outputFiles }) => {
// outputFiles.forEach(({ path, contents }) => {})
}
})