import { Compiler } from "webpack"; /** * Plugin to help our backends cleanly compile (without warnings) by default. * * Some third-party dependencies will attempt to require optional packages that they do not include. * Others use `require` in a way that prevents webpack from parsing the import (i.e. passing a variable instead of string literal); * * This plugin attempts to solve both cases by allowing us to pass a list of *npm packages* that should be specially handled. * For all JS files within one of these packages, the following cases will be completely ignored by webpack: * - Any call to `require()` wrapped in a try/catch block * - Any call to `require()` where the argument is an expression which cannot be statically resolved * - NB that not all JS expressions will trigger this case. Something like `"foo" + "bar"` can still be treated by webpack as if it were just `"foobar"`. * - Any non-call use of require (assigning it to another variable, etc.) * * Ignoring these calls to `require` means that the statement will be left - unmodified - in the resulting bundle. * Thus, such optional dependencies can still be used so long as they are installed and discoverable via normal node module resolution at runtime. */ export declare class IgnoreOptionalDependenciesPlugin { private _requestRegex; constructor(packages: string[]); apply(compiler: Compiler): void; } //# sourceMappingURL=OptionalDependenciesPlugin.d.ts.map