craco-wasm
v0.0.1
Published
craco plugin to add support for WASM modules
Downloads
438
Readme
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:
- Enable the
experiments.asyncWebAssembly
webpack config - Add
/\.wasm$/
to the list of files which are not processed by the file-loader in the CRA webpack config