import type { RspackPluginFunction } from '@rspack/core'; export interface PluginExecOptions { /** * Script to run, for example `node hello.js`. */ script: string; /** * Need compilation to wait for script ended or not. */ blocking?: boolean; /** * Condition to run script depends on mode. * Pass `watch` to run script only in watch mode or `build` to run not in watch mode. */ when?: 'always' | 'build' | 'watch'; } /** * Plugin that runs given shell script on `afterEmit` event. * Can be used instead `nodemon-webpack-plugin`. * @param options Options. * @returns Plugin. */ export declare function pluginExec({ script, blocking, when, }: PluginExecOptions): RspackPluginFunction;