import { Plugin } from "rolldown"; //#region src/options.d.ts /** * - `"auto"` will determine the environment at runtime and invoke the correct methods accordingly * - `"auto-inline"` always inlines the WASM and will decode it according to the environment * - `"browser"` omits emitting code that requires node.js builtin modules * - `"node"` omits emitting code that requires `fetch`, but requires Node.js 20.16.0 or higher */ type TargetEnv = "auto" | "auto-inline" | "browser" | "node"; interface Options { /** * The maximum file size for inline files. If a file exceeds this limit, it will be copied to the destination folder and loaded from a separate file at runtime. * If `maxFileSize` is set to `0` all files will be copied. * Files specified in `sync` to load synchronously are always inlined, regardless of size. * * @default 14 * 1024 */ maxFileSize?: number; /** * String used to rename the emitted Wasm files. * @default '[hash][extname]' */ fileName?: string; /** * Configures what code is emitted to instantiate the Wasm (both inline and separate) */ targetEnv?: TargetEnv; } //#endregion //#region src/index.d.ts declare function wasm(options?: Options): Plugin; //#endregion export { wasm };