forked from rollup/plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
37 lines (33 loc) 路 1.08 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { FilterPattern } from '@rollup/pluginutils';
import { Plugin } from 'rollup';
interface RollupDynamicImportVariablesOptions {
/**
* A minimatch pattern, or array of patterns, which specifies the files in the build the plugin
* should operate on.
* By default all files are targeted.
*/
include?: FilterPattern;
/**
* A minimatch pattern, or array of patterns, which specifies the files in the build the plugin
* should _ignore_.
* By default no files are ignored.
*/
exclude?: FilterPattern;
/**
* By default, the plugin quits the build process when it encounters an error.
* If you set this option to true, it will throw a warning instead and leave the code untouched.
* @default false
*/
warnOnError?: boolean;
}
export class VariableDynamicImportError extends Error {}
export function dynamicImportToGlob(
node: import('estree').BaseNode,
sourceString: string
): null | string;
/**
* Support variables in dynamic imports in Rollup.
*/
export default function dynamicImportVariables(
options?: RollupDynamicImportVariablesOptions
): Plugin;