@mutsuntsai/rsbuild-utils
v1.0.1
Published
Helper functions for setting up custom chunks in [Rsbuild](https://rsbuild.dev/). Supports only [PNPM](https://pnpm.io/) for now.
Downloads
34
Readme
Rsbuild Utils
Helper functions for setting up custom chunks in Rsbuild. Supports only PNPM for now.
Installation
pnpm add -D @mutsuntsai/rsbuild-utilsUsage
/**
* Create a test function such that it returns true if and only if
* the module matches any of the given {@link RegExp}s.
*/
export declare function makeTest(...tests: RegExp[]): (m: unknown) => boolean;
/**
* Based on the dependencies recorded in `pnpm-lock.yaml` file,
* create a {@link RegExp} that covers all descendant packages of the given packages.
*
* Note that this function has a side-effect: it will not include
* packages that were collected during previous calls of this function.
*/
export declare function createDescendantRegExp(...names: string[]): RegExp;