@zokki/astro-brotli
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@zokki/astro-brotli

This integration finds files matching the specified extensions within the Astro build output directory and compresses them using brotli.

Note

astro-brotli only for statically generated build and pre-rendered routes.

Installation

  1. Install with npm.

    npm install @zokki/astro-brotli
  2. Import into the astro-config. The integration should be the last one in the array.

    import { brotli } from '@zokki/astro-brotli';
    
    export default defineConfig({
    	integrations: [brotli()],
    });

Configuration

/**
 * Toggle logging of all compressed files
 *
 * @default true
 */
logAllFiles?: boolean;
/**
 * Which extension should be compressed
 *
 * @default ['css', 'js', 'html', 'xml', 'cjs', 'mjs', 'svg', 'txt']
 */
extensions?: string[];
/**
 * Options for brotli compression
 */
brotliOptions?: BrotliOptions;

License

MIT © Tim-Niclas Oelschläger

Package Sidebar

Install

npm i @zokki/astro-brotli

Weekly Downloads

4

Version

1.0.1

License

MIT

Unpacked Size

10.1 kB

Total Files

7

Last publish

Collaborators

  • zokkis_software