Closed theofilis closed 6 years ago
Hi, I'm Keiji. Let me make sure one thing about how to manage 3rd-party libraries.
According to gh-pages
branch, 3rd-party libraries (supercop.js
and js-sha3.js
) were bundled into ./dist/iroha.js
before. And, by recent changes, 3rd-party libraries are now excluded from bundled file. (For what I've seen, this PR is a configuration for this.)
When I was looking over this PR, I found that iroha-javascript doesn't work on browser.
npm run build:web
and build irohajs.js
<!DOCTYPE html>
<html>
<head>
<!-- Load 3rd-party libraries where placed to the same directory by hand -->
<script src="./supercop.js"></script>
<script src="./js-sha3.js"></script>
<script src="./irohajs.js"></script>
</head>
<body>
<h1>iroha web client</h1>
</body>
</html>
No error.
Uncaught TypeError: Cannot read property 'sha3_256' of undefined
at Object.<anonymous> (irohajs.ts:6)
at Object.r.exports (irohajs.js:1943)
at r (bootstrap 77e0038…:19)
at bootstrap 77e0038…:65
at bootstrap 77e0038…:65
at universalModuleDefinition:9
at universalModuleDefinition:9
Browser: Chrome Version 58.0.3029.81 (64-bit) Node: v7.9.0 NPM: v4.2.0
The cause probably be that neither supercop.js
nor js-sha3.js
can be loaded by Githubissues.
I update webpack configuration according to Yves recommendations.