/** * The following code is modified based on * https://github.com/gregberge/loadable-components * * MIT Licensed * Author Greg Bergé * Copyright 2019 Greg Bergé * https://github.com/gregberge/loadable-components/blob/main/LICENSE */ import type { Rspack } from '@modern-js/app-tools'; interface LoadablePluginOptions { filename: string; path?: string; writeToDisk?: any; outputAsset?: boolean; chunkLoadingGlobal?: string; } type Compiler = Rspack.Compiler; type Compilation = Rspack.Compilation; declare class LoadablePlugin { opts: LoadablePluginOptions; compiler: Compiler | null; constructor({ filename, path, writeToDisk, outputAsset, chunkLoadingGlobal, }?: LoadablePluginOptions); apply(compiler: Compiler): void; handleEmit(compilation: Compilation): { source(): string; size(): number; } | null; writeAssetsFile(manifest: string): void; } export default LoadablePlugin;