forked from rollup/rollup-plugin-commonjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
50 lines (48 loc) · 1.51 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
38
39
40
41
42
43
44
45
46
47
48
49
50
import { Plugin } from 'rollup';
interface RollupCommonJSOptions {
/**
* non-CommonJS modules will be ignored, but you can also
* specifically include/exclude files
* @default undefined
*/
include?: string | RegExp | ReadonlyArray<string | RegExp>,
/**
* non-CommonJS modules will be ignored, but you can also
* specifically include/exclude files
* @default undefined
*/
exclude?: string | RegExp | ReadonlyArray<string | RegExp>,
/**
* search for files other than .js files (must already
* be transpiled by a previous plugin!)
* @default [ '.js' ]
*/
extensions?: ReadonlyArray<string | RegExp>,
/**
* if true then uses of `global` won't be dealt with by this plugin
* @default false
*/
ignoreGlobal?: boolean,
/**
* if false then skip sourceMap generation for CommonJS modules
* @default true
*/
sourceMap?: boolean,
/**
* explicitly specify unresolvable named exports
* ([see below for more details](https://github.com/rollup/rollup-plugin-commonjs#custom-named-exports))
* @default undefined
*/
namedExports?: { [package: string]: ReadonlyArray<string> },
/**
* sometimes you have to leave require statements
* unconverted. Pass an array containing the IDs
* or a `id => boolean` function. Only use this
* option if you know what you're doing!
*/
ignore?: ReadonlyArray<string | ((id: string) => boolean)>,
}
/**
* Convert CommonJS modules to ES6, so they can be included in a Rollup bundle
*/
export default function commonjs(options?: RollupCommonJSOptions): Plugin;