1 | import { Plugin } from 'rollup';
|
2 |
|
3 | export interface RollupWasmOptions {
|
4 | /**
|
5 | * Specifies an array of strings that each represent a WebAssembly file to load synchronously.
|
6 | */
|
7 | sync?: readonly string[];
|
8 | /**
|
9 | * 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.
|
10 | * If `maxFileSize` is set to `0` all files will be copied.
|
11 | * Files specified in `sync` to load synchronously are always inlined, regardless of size.
|
12 | */
|
13 | maxFileSize?: Number;
|
14 | /**
|
15 | * A string which will be added in front of filenames when they are not inlined but are copied.
|
16 | */
|
17 | publicPath?: string;
|
18 | }
|
19 |
|
20 | /**
|
21 | * 🍣 A Rollup which allows importing and bundling [WebAssembly modules](http://webassembly.org).
|
22 | */
|
23 | export function wasm(options?: RollupWasmOptions): Plugin;
|
24 | export default wasm;
|