0.0.1 • Published 2 years ago

craco-wasm v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

craco-wasm

A craco plugin to add support for WASM modules to CRA apps.

Usage

yarn add craco-wasm

In craco.config.js

const cracoWasm = require("craco-wasm")

module.exports = {
    plugins: [cracoWasm()]
}

How?

create-react-app is based on Webpack 5, which has experimental support for WASM modules. In order to enable this support this plugin does two things:

  1. Enable the experiments.asyncWebAssembly webpack config
  2. Add /\.wasm$/ to the list of files which are not processed by the file-loader in the CRA webpack config