
Some checks failed
Build and Push Docker image (ext) / docker (push) Failing after 3m44s
- Recompile sdk_client WASM with --target web for ES modules - Update Dockerfile to build WASM in web target instead of bundler - Modify index.html to initialize WASM before router - Update service.ts and router.ts to use ES module imports - Fix 'module is not defined' error in browser
40 lines
1.3 KiB
HTML
Executable File
40 lines
1.3 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="author" content="4NK">
|
|
<meta name="description" content="4NK Web5 Platform">
|
|
<meta name="keywords" content="4NK web5 bitcoin blockchain decentralize dapps relay contract">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link rel="stylesheet" href="./style/4nk.css">
|
|
<script src="https://unpkg.com/html5-qrcode"></script>
|
|
<title>4NK Application</title>
|
|
</head>
|
|
<body>
|
|
<div id="header-container"></div>
|
|
<div id="containerId" class="container">
|
|
<!-- 4NK Web5 Solution -->
|
|
</div>
|
|
<!-- <script type="module" src="/src/index.ts"></script> -->
|
|
<script type="module">
|
|
// Initialize WASM first
|
|
import init, * as sdk from './pkg/sdk_client.js';
|
|
|
|
// Initialize the application
|
|
import { init as initRouter } from '/src/router.ts';
|
|
|
|
(async () => {
|
|
try {
|
|
// Initialize WASM
|
|
await init();
|
|
console.log('WASM initialized successfully');
|
|
|
|
// Initialize the router
|
|
await initRouter();
|
|
} catch (error) {
|
|
console.error('Failed to initialize application:', error);
|
|
}
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html> |