This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.

18 lines
732 B
TypeScript
Raw Normal View History

2021-04-02 02:24:13 +03:00
import { ConfigPlugin, StaticPlugin } from '../Plugin.types';
/**
* Resolves static module plugin and potentially falls back on a provided plugin if the module cannot be resolved
*
* @param config
* @param fallback Plugin with `_resolverError` explaining why the module couldn't be used
* @param projectRoot optional project root, fallback to _internal.projectRoot. Used for testing.
* @param _isLegacyPlugin Used to suppress errors thrown by plugins that are applied automatically
*/
export declare const withStaticPlugin: ConfigPlugin<{
plugin: StaticPlugin | ConfigPlugin | string;
fallback?: ConfigPlugin<{
_resolverError: Error;
} & any>;
projectRoot?: string;
_isLegacyPlugin?: boolean;
}>;