/** * @packageDocumentation * * A webpack/Rspack plugin to generate chunk loading runtime for Lynx. */ import type { Compiler } from '@rspack/core'; /** * The options for ChunkLoadingWebpackPlugin * * @public */ export interface ChunkLoadingWebpackPluginOptions { } /** * The ChunkLoadingWebpackPlugin enables chunk loading for webpack/Rspack in Lynx. * * @example * * - Use with Rspack. * * ```js * // rspack.config.js * import { ChunkLoadingWebpackPlugin } from '@lynx-js/chunk-loading-webpack-plugin' * export default { * output: { * chunkFormat: 'require', * }, * plugins: [new ChunkLoadingWebpackPlugin()], * } * ``` * * @example * * - Use with Webpack. * * ```js * // webpack.config.js * import { ChunkLoadingWebpackPlugin } from '@lynx-js/chunk-loading-webpack-plugin' * export default { * output: { * chunkFormat: 'lynx', * }, * plugins: [new ChunkLoadingWebpackPlugin()], * } * ``` * * @public */ export declare class ChunkLoadingWebpackPlugin { private readonly options; constructor(options?: Partial); /** * `defaultOptions` is the default options that the {@link ChunkLoadingWebpackPlugin} uses. * * @public */ static defaultOptions: Readonly>; /** * The entry point of a webpack plugin. * @param compiler - the webpack compiler */ apply(compiler: Compiler): void; }