import type { Compiler } from '@rspack/core'; /** * The options for {@link ReactRefreshRspackPlugin}. * * @public */ export interface ReactRefreshRspackPluginOptions { } /** * ReactRefreshRspackPlugin allows using fast refresh in ReactLynx. * * @example * ```js * // rspack.config.js * import { ReactRefreshRspackPlugin } from '@lynx-js/react-refresh-webpack-plugin' * export default { * module: { * rules: [ * { * test: /\.[jt]sx?$/, * exclude: [ * /node_modules/, * /@lynx-js/, * /react-refresh/, * /compiler-nodiff-runtime3/, * ReactRefreshRspackPlugin.loader, * ], * use: [ReactRefreshRspackPlugin.loader], * }, * ], * }, * plugins: [new ReactRefreshRspackPlugin()], * } * ``` * * @public */ export declare class ReactRefreshRspackPlugin { #private; /** * @param options - The options for react refresh. */ constructor(options?: ReactRefreshRspackPluginOptions); /** * The loader for react refresh. * * @remarks * Please note that the runtime of react should be ignored. See the example below: * * @example * ```js * // rspack.config.js * import { ReactRefreshRspackPlugin } from '@lynx-js/react-refresh-webpack-plugin' * import { ReactWebpackPlugin } from '@lynx-js/react-webpack-plugin' * * export default { * module: { * rules: [ * { * issueLayer: ReactWebpackPlugin.LAYERS.BACKGROUND, * test: /\.[jt]sx?$/, * exclude: [ * /node_modules/, * /@lynx-js\/react/, * ReactRefreshRspackPlugin.loader, * ], * use: [ReactRefreshRspackPlugin.loader], * }, * ], * }, * plugins: [new ReactRefreshRspackPlugin()], * } * ``` */ static loader: string; /** * The entry point of a rspack plugin. * @param compiler - the rspack compiler */ apply(compiler: Compiler): void; }