UNPKG

webassembly-loader-sw

Version:

Webpack loader for WebAssembly (like wasm-loader but have different export options)

20 lines (19 loc) 664 B
/// <reference types="node" /> import { TransformModuleOptions } from './options'; /** Wrap binary data as commonjs module so it can be imported by doing require(module) * @param buffer raw binary data to be wrapped as es6 module * @return chainable object which represent `wrap this data as...` * @example return wrap(arrayBuffer).asWebAssembly.Module */ export default function (buffer: Buffer, options: TransformModuleOptions): { asBuffer: string; asWebAssembly: { Module: string; Instance: string; }; promiseWebAssembly: { Module: string; Instance: string; Both: string; }; };