Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

systemjs-plugin-wasm

AMorgaut4ISC1.0.1-beta

SystemJS plugin for loading and instanciating Web Assembly modules

jspm, systemjs, plugin, loader, module, wasm, WebAssembly

readme

NPM version ISC Licensed

systemjs-plugin-wasm

SystemJS plugin for loading and instanciating Web Assembly modules

Installation

npm

  npm install systemjs-plugin-wasm

jspm

jspm install wasm

Configuration

Create a map configuration to the plugin:

System.config({
  map: {
    'wasm': 'node_modules/systemjs-plugin-wasm/wasm.js'
  }
})

Usage

With package config and an extension:

const myApi = (await System.import('myWebAssemblyModule.wasm!')).default;

myApi.myFunction();