Browse Source

manual export

develop
jfinn 1 year ago
parent
commit
9e83468936
1 changed files with 22 additions and 13 deletions
  1. 22
    13
      example/src/index.js

+ 22
- 13
example/src/index.js View File

@@ -1,13 +1,22 @@
1
-import React from 'react';
2
-import ReactDOM from 'react-dom/client';
3
-import './index.css';
4
-import App from './App.jsx';
5
-
6
-const root = ReactDOM.createRoot(
7
-  document.getElementById('root')
8
-);
9
-root.render(
10
-  <React.StrictMode>
11
-    <App />
12
-  </React.StrictMode>
13
-);
1
+// cuurently I do not have write access to the key-exchange-client
2
+// to build this file will replace example/src/index.js in the key-exchange-client repo 
3
+// we build the repo  
4
+
5
+// wasm-pack build web-client --target bundler --out-dir ../pkg
6
+// cd example
7
+// npm install 
8
+// npm run build
9
+// we take the output from example/dist and put it in tmp_hot_rld/key_exchange_dist in relays-io/video
10
+
11
+
12
+import { connect, WalletConnection, keyStores, Near } from 'near-api-js';
13
+
14
+const web_client = await import("../../pkg/web_client");
15
+const { KeyProvisioner, ProvisionerConfig } = await import("../../pkg/web_client");
16
+
17
+
18
+
19
+import * as near_api from 'near-api-js';
20
+
21
+Object.assign(glob_rx.react.modules,{near_api,web_client})
22
+Object.assign(glob_rx.react.i,{connect, WalletConnection, keyStores, Near,KeyProvisioner, ProvisionerConfig})

Loading…
Cancel
Save