This commit is contained in:
parent
7c8fff97ce
commit
377061e9d6
1
packages/app/.gitignore
vendored
1
packages/app/.gitignore
vendored
@ -25,3 +25,4 @@ yarn-error.log*
|
|||||||
.idea
|
.idea
|
||||||
|
|
||||||
dist/
|
dist/
|
||||||
|
dev-dist/
|
@ -3,7 +3,7 @@ import "@szhsin/react-menu/dist/index.css";
|
|||||||
import "./fonts/inter.css";
|
import "./fonts/inter.css";
|
||||||
|
|
||||||
import { compress, expand_filter, flat_merge, get_diff, pow, default as wasmInit } from "@snort/system-wasm";
|
import { compress, expand_filter, flat_merge, get_diff, pow, default as wasmInit } from "@snort/system-wasm";
|
||||||
import WasmPath from "@snort/system-wasm/pkg/system_wasm_bg.wasm?init";
|
import WasmPath from "@snort/system-wasm/pkg/system_wasm_bg.wasm";
|
||||||
|
|
||||||
import { StrictMode } from "react";
|
import { StrictMode } from "react";
|
||||||
import * as ReactDOM from "react-dom/client";
|
import * as ReactDOM from "react-dom/client";
|
||||||
@ -25,7 +25,7 @@ import PowWorkerURL from "@snort/system/src/pow-worker.ts?worker&url";
|
|||||||
import { SnortContext } from "@snort/system-react";
|
import { SnortContext } from "@snort/system-react";
|
||||||
import { removeUndefined, throwIfOffline } from "@snort/shared";
|
import { removeUndefined, throwIfOffline } from "@snort/shared";
|
||||||
|
|
||||||
import React, { lazy, Suspense } from "react";
|
import { lazy, Suspense } from "react";
|
||||||
|
|
||||||
const NetworkGraph = lazy(() => import("@/Pages/NetworkGraph"));
|
const NetworkGraph = lazy(() => import("@/Pages/NetworkGraph"));
|
||||||
|
|
||||||
@ -88,8 +88,7 @@ export class WasmPowWorker implements PowMiner {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//const hasWasm = "WebAssembly" in globalThis;
|
const hasWasm = "WebAssembly" in globalThis;
|
||||||
const hasWasm = false;
|
|
||||||
const DefaultPowWorker = hasWasm ? undefined : new PowWorker(PowWorkerURL);
|
const DefaultPowWorker = hasWasm ? undefined : new PowWorker(PowWorkerURL);
|
||||||
export const GetPowWorker = () => (hasWasm ? new WasmPowWorker() : unwrap(DefaultPowWorker));
|
export const GetPowWorker = () => (hasWasm ? new WasmPowWorker() : unwrap(DefaultPowWorker));
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ export default defineConfig({
|
|||||||
filename: "dist/stats.html",
|
filename: "dist/stats.html",
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
assetsInclude: ["**/*.md"],
|
assetsInclude: ["**/*.md","**/*.wasm"],
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
"@": "/src",
|
"@": "/src",
|
||||||
|
Loading…
Reference in New Issue
Block a user