Allow esm builds (#157)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2020 @polkadot/bytes-asmjs-crypto authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export default null;
|
||||
export const asmJsInit = null;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2020 @polkadot/bytes-asmjs-crypto authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export default null;
|
||||
export const asmJsInit = null;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2020 @polkadot/bytes-wasm-crypto authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export default null;
|
||||
export const wasmBytes = null;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2020 @polkadot/bytes-wasm-crypto authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export default null;
|
||||
export const wasmBytes = null;
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
"@polkadot/bytes-wasm-crypto": "^2.0.2-12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/dev": "^0.60.23",
|
||||
"@polkadot/util": "^4.2.2-11",
|
||||
"@polkadot/x-randomvalues": "^4.2.2-11",
|
||||
"@polkadot/dev": "^0.60.27",
|
||||
"@polkadot/util": "^4.2.2-12",
|
||||
"@polkadot/x-randomvalues": "^4.2.2-12",
|
||||
"override-require": "^1.1.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
// Copyright 2019-2020 @polkadot/wasm-crypto authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import asmFallback from '@polkadot/bytes-asmjs-crypto';
|
||||
import wasmBytes from '@polkadot/bytes-wasm-crypto';
|
||||
import { asmJsInit } from '@polkadot/bytes-asmjs-crypto';
|
||||
import { wasmBytes } from '@polkadot/bytes-wasm-crypto';
|
||||
|
||||
import { allocString, allocU8a, getWasm, initWasm, resultString, resultU8a, withWasm } from './bridge';
|
||||
import * as imports from './imports';
|
||||
|
||||
const wasmPromise = initWasm(wasmBytes, asmFallback, imports).catch(() => null);
|
||||
const wasmPromise = initWasm(wasmBytes, asmJsInit, imports).catch(() => null);
|
||||
|
||||
export const bip39Generate = withWasm((wasm) =>
|
||||
(words: 12 | 15 | 18 | 21 | 24): string => {
|
||||
|
||||
Reference in New Issue
Block a user