Add system-query

This commit is contained in:
2023-09-06 13:45:25 +01:00
parent 4df6c19248
commit a0f1031b85
18 changed files with 792 additions and 12 deletions

View File

@ -12,6 +12,7 @@
"@scure/bip39": "^1.1.1",
"@snort/shared": "workspace:*",
"@snort/system": "workspace:*",
"@snort/system-query": "workspace:*",
"@snort/system-react": "workspace:*",
"@szhsin/react-menu": "^3.3.1",
"@void-cat/api": "^1.0.4",

View File

@ -2,6 +2,9 @@ import "./index.css";
import "@szhsin/react-menu/dist/index.css";
import "./fonts/inter.css";
import {default as wasmInit} from "@snort/system-query";
import WasmPath from "@snort/system-query/pkg/system_query_bg.wasm";
import { StrictMode } from "react";
import * as ReactDOM from "react-dom/client";
import { Provider } from "react-redux";
@ -69,6 +72,7 @@ export const DefaultPowWorker = new PowWorker("/pow.js");
serviceWorkerRegistration.register();
async function initSite() {
await wasmInit(WasmPath);
const login = LoginStore.takeSnapshot();
db.ready = await db.isAvailable();
if (db.ready) {

View File

@ -115,7 +115,7 @@ const config = {
use: [MiniCssExtractPlugin.loader, require.resolve("css-loader")],
},
{
test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif|webp)$/i,
test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif|webp|wasm)$/i,
type: "asset",
},
],
@ -150,7 +150,7 @@ const config = {
extensions: ["...", ".tsx", ".ts", ".jsx", ".js"],
modules: ["...", __dirname, path.resolve(__dirname, "src")],
fallback: { crypto: false },
},
}
};
module.exports = () => config;