Mirror: Rollup plugin to automatically check the exports of a library for cjs-module-lexer compatibility.
at v1.0.2 1.1 kB view raw
1import { Plugin } from 'rollup'; 2import { FilterPattern } from '@rollup/pluginutils'; 3 4export interface CJSCheckOptions { 5 /** 6 * A picomatch pattern, or array of patterns, which specifies the files in 7 * the build the plugin should operate on. By default, all files with 8 * extension `".cjs"` or those in `extensions` are included, but you can 9 * narrow this list by only including specific files. These files will be 10 * analyzed and transpiled if either the analysis does not find ES module 11 * specific statements or `transformMixedEsModules` is `true`. 12 * @default undefined 13 */ 14 include?: FilterPattern; 15 /** 16 * A picomatch pattern, or array of patterns, which specifies the files in 17 * the build the plugin should _ignore_. By default, all files with 18 * extensions other than those in `extensions` or `".cjs"` are ignored, but you 19 * can exclude additional files. See also the `include` option. 20 * @default undefined 21 */ 22 exclude?: FilterPattern; 23} 24 25/** A Rollup plugin for checking CommonJS exports against `cjs-module-lexer`. */ 26export default function cjsCheck(options?: CJSCheckOptions): Plugin;