@wesley-clements/rollup-plugin-raw-wasm
A Rollup which allows loading wasm
raw paths. This is just the official Rollup wasm plugin but does not instaniate a WebAssembly module.
Requirements
This plugin requires an LTS Node version (v8.0.0+) and Rollup v1.20.0+.
Install
Using npm:
npm install @wesley-clements/rollup-plugin-raw-wasm --save-dev
Usage
Create a rollup.config.js
configuration file and import the plugin:
import { rawWasm } from '@wesley-clements/rollup-plugin-raw-wasm';
export default {
...
plugins: [rawWasm()],
...
};
Then call rollup
either via the CLI or the API.
Options
copy
Type: Boolean
Default: true
Determines whether the wasm files will be copied to the output folder.
publicPath
Type: String
Default: ''
A string which will be added in front of filenames when they are copied.