import type { Compiler, RspackPluginInstance, RuleSetCondition } from '@rspack/core'; export type PluginOptions = { /** * Specifies which files should be processed by the Preact Refresh loader. * This option is passed to the `builtin:preact-refresh-loader` as the `rule.test` condition. * Works identically to Rspack's `rule.test` option. * @default /\.(?:js|jsx|mjs|cjs|ts|tsx|mts|cts)$/ */ test?: RuleSetCondition; /** * Include files to be processed by the plugin. * The value is the same as the `rule.include` option in Rspack. * @default undefined */ include?: RuleSetCondition | null; /** * Exclude files from being processed by the plugin. * The value is the same as the `rule.exclude` option in Rspack. * @default /[\\/]node_modules[\\/]/ */ exclude?: RuleSetCondition | null; /** * Configure the error overlay. */ overlay?: { /** * The module to use for the error overlay. */ module: string; }; /** * Path to the `preact` package. * @default `path.dirname(require.resolve('preact/package.json'))` */ preactPath?: string; }; /** * @deprecated Use PluginOptions instead. */ export type IPreactRefreshRspackPluginOptions = PluginOptions; declare class PreactRefreshRspackPlugin implements RspackPluginInstance { name: string; private options; constructor(options?: PluginOptions); apply(compiler: Compiler): void; } export { PreactRefreshRspackPlugin };