Skip to content

0x009922/iroha-js-sdk-issue-104-repro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hyperledger/iroha-javascript#104 repro

The issue: @iroha2/crypto-target-web doesn't work with Vite out of the box · Issue #104 · hyperledger/iroha-javascript

Steps to reproduce

  1. Install packages:
    $ pnpm i
  2. Run dev server:
    $ pnpm dev
  3. Open browser at printed URL

Expected result

To see Sample hash: <long hash> in the browser.

Note: edit src/main.ts file

Actual result

Nothing is displayed in browser, except errors in console:

img.png

Workaround in action

Open src/main.ts and change this:

// This works:
// import wasmURL from '@iroha2/crypto-target-web/wasm-pkg/iroha_crypto_bg.wasm?url'
// await init(wasmURL)

// This not:
await init()

to this:

// This works:
import wasmURL from '@iroha2/crypto-target-web/wasm-pkg/iroha_crypto_bg.wasm?url'
await init(wasmURL)

// This not:
// await init()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published