You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/routes/bilibili/manga-update.ts
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
import{Route}from'@/types';
2
2
importcachefrom'@/utils/cache';
3
3
importgotfrom'@/utils/got';
4
-
import{Go}from'./wasm-exec.js';
5
4
6
5
exportconstroute: Route={
7
6
path: '/manga/update/:comicid',
@@ -28,6 +27,9 @@ export const route: Route = {
28
27
29
28
// Based on https://github.com/SocialSisterYi/bilibili-API-collect/issues/1168#issuecomment-2620749895
30
29
asyncfunctiongenReqSign(query,body){
30
+
// Don't import on top-level to avoid a cyclic dependency - wasm-exec.js generated via `pnpm build`, which in turn needs wasm-exec.js to import routes correctly
31
+
const{ Go }=awaitimport('./wasm-exec.js');
32
+
31
33
// Cache the wasm binary as it's quite large (~2MB)
32
34
// Here the binary is saved as base64 as the cache stores strings
0 commit comments