Skip to content

Commit

Permalink
fixed load wasm url not working
Browse files Browse the repository at this point in the history
  • Loading branch information
eric2788 committed Jan 10, 2024
1 parent 8b72800 commit f1e9cbd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/adapters/websocket-hook.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { injectFuncAsListener } from "~utils/event"
import { sendBLiveMessage } from "~utils/messaging"
import wasmUrl from "raw:~assets/brotli-dec.wasm"
import init from 'brotli-dec-wasm/pkg/index'
import init, { decompress as wasmDecompress } from 'brotli-dec-wasm/pkg/index'

var decompress = null

const loadWasm = init(wasmUrl).then(output => {
decompress = output.decompress
const loadWasm = init(wasmUrl).then(_ => {
decompress = wasmDecompress
console.info('wasm loaded.')
})

Expand Down

0 comments on commit f1e9cbd

Please sign in to comment.