Files
wasm/scripts/pack-wasm-base.js
T
Jaco Greeff e2d0726608 Split js/wasm (#130)
* Split js/wasm

* require
2020-11-02 18:34:00 +01:00

12 lines
351 B
JavaScript
Executable File

// Copyright 2019-2020 @polkadot/wasm authors & contributors
// SPDX-License-Identifier: Apache-2.0
const fs = require('fs');
const buffer = fs.readFileSync('./pkg/wasm_opt.wasm');
fs.writeFileSync('./build/wasm/bytes.js', `// Generated as part of the build, do not edit
module.exports = Buffer.from('${buffer.toString('base64')}', 'base64');
`);