* Polyfill require adjust * Assert in promise for getRandomBytes * Adjust jest * Revert explicit overrides (from base) * use typeof * Re-add crypto-polyfill (backwards, direct imports) * crypto log * Fix dev * Adjust
13 lines
408 B
JavaScript
Executable File
13 lines
408 B
JavaScript
Executable File
// Copyright 2019-2020 @polkadot/wasm authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
const fs = require('fs');
|
|
|
|
const buffer = fs.readFileSync('./build/wasm_opt.wasm');
|
|
|
|
fs.writeFileSync('./build/wasm_wasm.js', `// Generated as part of the build, do not edit
|
|
|
|
module.exports = Buffer.from('${buffer.toString('base64')}', 'base64');
|
|
`);
|