rollup-plugin-replace
- Version 2.2.0
- Published
- 12.4 kB
- 2 dependencies
- MIT license
Install
npm i rollup-plugin-replace
yarn add rollup-plugin-replace
pnpm add rollup-plugin-replace
Overview
[![](https://img.shields.io/npm/v/rollup-plugin-replace.svg?style=flat)](https://www.npmjs.com/package/rollup-plugin-replace)
Index
Functions
Interfaces
Type Aliases
Functions
function replace
replace: (options?: RollupReplaceOptions) => Plugin;
Replace strings in files while bundling them.
Interfaces
interface RollupReplaceOptions
interface RollupReplaceOptions {}
property delimiters
delimiters?: [string, string];
To replace every occurrence of
<@foo@>
instead of every occurrence offoo
, supply delimiters
property exclude
exclude?: string | RegExp | ReadonlyArray<string | RegExp> | null;
Files that should be excluded, if
include
is otherwise too permissive.
property include
include?: string | RegExp | ReadonlyArray<string | RegExp> | null;
A minimatch pattern, or array of patterns, of files that should be processed by this plugin (if omitted, all files are included by default)
property values
values?: { [str: string]: Replacement };
You can separate values to replace from other options.
index signature
[str: string]: | Replacement | RollupReplaceOptions['include'] | RollupReplaceOptions['values'];
All other options are treated as
string: replacement
replacers, orstring: (id) => replacement
functions.
Type Aliases
type Replacement
type Replacement = string | ((id: string) => string);
Package Files (1)
Dependencies (2)
Dev Dependencies (12)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/rollup-plugin-replace
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/rollup-plugin-replace)
- HTML<a href="https://www.jsdocs.io/package/rollup-plugin-replace"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2690 ms. - Missing or incorrect documentation? Open an issue for this package.