@luncheon/esbuild-plugin-gzip
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.0 • Public • Published

    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 }) => {})
      }
    })

    License

    WTFPL

    Keywords

    Install

    npm i @luncheon/esbuild-plugin-gzip

    DownloadsWeekly Downloads

    188

    Version

    0.1.0

    License

    WTFPL

    Unpacked Size

    3.32 kB

    Total Files

    5

    Last publish

    Collaborators

    • luncheon