jlegrone / optimize-wasm-webpack-plugin

Webpack plugin for optimizing the size of wasm files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm node deps tests cover size

optimize-wasm-webpack-plugin

This plugin uses binaryen to optimize your WebAssembly.

Requirements

This module requires a minimum of Node v6.11.5 and Webpack v4.0.0.

Getting Started

To begin, you'll need to install optimize-wasm-webpack-plugin:

$ npm install optimize-wasm-webpack-plugin --save-dev

Then add the plugin to your webpack config. For example:

webpack.config.js

const OptimizeWasmPlugin = require('optimize-wasm-webpack-plugin');

module.exports = {
  optimization: {
    minimizer: [new OptimizeWasmPlugin()],
  },
};

And run webpack via your preferred method.

License

Apache 2.0

About

Webpack plugin for optimizing the size of wasm files

License:Apache License 2.0


Languages

Language:TypeScript 67.3%Language:JavaScript 32.7%