From e78311b3aff207a67f2da0471b64955d3ffd1605 Mon Sep 17 00:00:00 2001 From: Steven Date: Thu, 1 Feb 2024 19:39:41 +0800 Subject: [PATCH] fix: initial gomark wasm --- web/.eslintrc.json | 2 +- web/index.html | 1 - web/src/main.tsx | 3 ++- web/src/{ => wasm}/gomark.wasm | Bin web/{public => src/wasm}/wasm_exec.js | 0 5 files changed, 3 insertions(+), 3 deletions(-) rename web/src/{ => wasm}/gomark.wasm (100%) rename web/{public => src/wasm}/wasm_exec.js (100%) diff --git a/web/.eslintrc.json b/web/.eslintrc.json index 209b39ad..01ef673a 100644 --- a/web/.eslintrc.json +++ b/web/.eslintrc.json @@ -13,7 +13,7 @@ "sourceType": "module" }, "plugins": ["react", "@typescript-eslint", "prettier"], - "ignorePatterns": ["node_modules", "dist", "public"], + "ignorePatterns": ["node_modules", "dist", "public", "src/wasm"], "rules": { "prettier/prettier": [ "error", diff --git a/web/index.html b/web/index.html index 022137fa..2bbab70e 100644 --- a/web/index.html +++ b/web/index.html @@ -17,7 +17,6 @@ document.documentElement.classList.add("dark"); } -
diff --git a/web/src/main.tsx b/web/src/main.tsx index db7ffb4c..d0980f84 100644 --- a/web/src/main.tsx +++ b/web/src/main.tsx @@ -5,13 +5,14 @@ import { Provider } from "react-redux"; import { RouterProvider } from "react-router-dom"; import "./css/global.css"; import "./css/tailwind.css"; -import wasmUrl from "./gomark.wasm?url"; import "./helpers/polyfill"; import "./i18n"; import "./less/highlight.less"; import router from "./router"; import store from "./store"; import theme from "./theme"; +import wasmUrl from "./wasm/gomark.wasm?url"; +import "./wasm/wasm_exec.js"; (async () => { const go = new window.Go(); diff --git a/web/src/gomark.wasm b/web/src/wasm/gomark.wasm similarity index 100% rename from web/src/gomark.wasm rename to web/src/wasm/gomark.wasm diff --git a/web/public/wasm_exec.js b/web/src/wasm/wasm_exec.js similarity index 100% rename from web/public/wasm_exec.js rename to web/src/wasm/wasm_exec.js