import {ProjextRollupCompressionPlugin} from 'projext-plugin-rollup/src/plugins/compression/index.js'
ProjextRollupCompressionPlugin
This is a Rollup plugin that takes all the files that match an specific filter and compress using Gzip.
Constructor Summary
Public Constructor | ||
public |
constructor(options: ProjextRollupCompressionPluginOptions, name: string) |
Member Summary
Public Members | ||
public |
The filter to decide which files will be compressed and which won't. |
|
public |
The name of the plugin instance. |
Method Summary
Public Methods | ||
public |
Gets the plugin options |
|
public |
writeBundle(): Promise<Array, Error> This method gets called after Rollup writes the files on the file system. |
Public Constructors
public constructor(options: ProjextRollupCompressionPluginOptions, name: string) source
Params:
Name | Type | Attribute | Description |
options | ProjextRollupCompressionPluginOptions |
|
The options to customize the plugin behaviour. |
name | string |
|
The name of the plugin's instance. |
Public Members
public filter: RollupFilter source
The filter to decide which files will be compressed and which won't.
Public Methods
public writeBundle(): Promise<Array, Error> source
This method gets called after Rollup writes the files on the file system. It takes care of finding all the files that match the filter and compressing them with Gzip.
Return:
Promise<Array, Error> | If everything goes well, the Promise will resolve on a list of ProjextRollupCompressionPluginEntry objects. |