UNPKG

webpack-genius

Version:

**For chinese developers:** you'd better add taobao mirror before everything start. Or you may fail to install. ```bash yarn config set registry http://registry.npm.taobao.org ```

24 lines (23 loc) 954 B
import { RuleHandle } from './RuleHandle'; import { RuleSetLoader, RuleSetRule } from 'webpack'; export interface BabelOptions { 'thread-loader': { workers: number; workerParallelJobs: number; poolTimeout: number; }; 'babel-loader': { cacheCompression: boolean; cacheDirectory: string | boolean; plugins: Array<[string] | [string, Record<string, any>] | [string, Record<string, any>, string]>; presets: Array<[string] | [string, Record<string, any>]>; }; } export declare abstract class BabelHandle<T extends BabelOptions = BabelOptions> extends RuleHandle<T> { onInit(): void; addBabelPlugin(plugin: [string] | [string, Record<string, any>] | [string, Record<string, any>, string]): this; addBabelPreset(preset: [string] | [string, Record<string, any>]): this; protected resetEntries(): void; protected loaders(): RuleSetLoader[]; collect(): RuleSetRule; }