We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f974d8 commit a54d930Copy full SHA for a54d930
src/lexer.js
@@ -91,7 +91,12 @@ function copyLE (src, outBuf16) {
91
}
92
93
const loadWasm = (typeof EXTERNAL_PATH === "string" && (async () => {
94
- return (await import('node:fs/promises')).readFile(EXTERNAL_PATH);
+ return (await import("node:fs/promises"))
95
+ .readFile(
96
+ (await import("node:url")).fileURLToPath(
97
+ import.meta.resolve("../lib/lexer.wasm")
98
+ )
99
+ );
100
})) || (async () => {
101
const binary = WASM_BINARY
102
if (typeof window !== "undefined" && typeof atob === "function") {
0 commit comments