@regru/webpack-babel-multi-target-plugin
Version:
A Webpack plugin that works with Babel to allow deployment of ES2015 builds targeted to modern browsers, with an ES5 fallback for legacy browsers.
15 lines (14 loc) • 756 B
TypeScript
import { compilation, Compiler, Plugin } from 'webpack';
import Compilation = compilation.Compilation;
import Dependency = compilation.Dependency;
import { BabelTarget } from './babel-target';
import { BabelTargetEntryDependency } from './babel.target.entry.dependency';
export declare abstract class BabelTargetEntryPlugin implements Plugin {
protected targets: BabelTarget[];
protected context: string;
protected name: string;
protected constructor(targets: BabelTarget[], context: string, name: string);
apply(compiler: Compiler): void;
protected addEntry(compilation: Compilation, dep: BabelTargetEntryDependency): Promise<void>;
protected addEntry(compilation: Compilation, dep: Dependency, name: string): Promise<void>;
}