import { UnpluginExecutionOptions, UnpluginFactory } from "./types.cjs"; import { UnpluginFactoryDecorator, UnpluginFactoryOptions } from "./unplugin.cjs"; import { ExecutionContext, UnresolvedContext } from "@powerlines/core"; import { RspackOptionsNormalized } from "@rspack/core"; //#region src/rspack.d.ts /** * Resolves the options for [rspack](https://rspack.rs/). * * @param context - The build context. * @returns The resolved options. */ declare function resolveOptions(context: TContext): Partial; /** * Creates a Rspack plugin factory that generates a plugin instance. * * @see https://rspack.dev/concepts/plugins * * @example * ```ts * // rspack.config.ts * import { createRspackFactory } from "@powerlines/unplugin/rspack"; * * const powerlinesPlugin = createRspackFactory({ name: "example-app", ... }); * * export default defineConfig({ * plugins: [powerlinesPlugin()], * }); * * ``` * * @param options - The options to create the plugin factory with. * @param decorate - A function to decorate the plugin options with additional properties or hooks. This can be used to add custom behavior to the plugin instance, such as additional hooks or configuration options. The function receives the generated plugin options and should return an object containing any additional properties or hooks to be merged into the final plugin options. * @returns A function that generates a Rspack plugin instance when called. The generated plugin will invoke the Powerlines API hooks during the build process, allowing you to integrate Powerlines into your Rspack build. */ declare function createRspackFactory(options?: Omit, decorate?: UnpluginFactoryDecorator): UnpluginFactory>; /** * An Rspack plugin that will invoke the Powerlines API hooks during the build process. * * @see https://rspack.dev/concepts/plugins * * @example * ```ts * // rspack.config.ts * * import powerlines from "@powerlines/unplugin/rspack"; * * export default { * plugins: [powerlines({ name: "example-app", ... })], * } * ``` */ declare const plugin: (options?: UnpluginExecutionOptions | undefined) => import("unplugin").RspackPluginInstance; //#endregion export { createRspackFactory, plugin as default, plugin, resolveOptions }; //# sourceMappingURL=rspack.d.cts.map