Skip to content

Commit ed0cce8

Browse files
committed
fix: normalize wasm path
1 parent c9aa2df commit ed0cce8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/core/src/runtime/worker/loadModule.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,10 @@ export const loadModule = ({
175175
wasmPath: string,
176176
callback: (err: Error | null, data?: Buffer) => void,
177177
) => {
178-
const currentDirectory = path.dirname(distPath);
179178
const joinedPath = isRelativePath(wasmPath)
180-
? path.join(currentDirectory, wasmPath)
179+
? path.join(path.dirname(distPath), wasmPath)
181180
: wasmPath;
182-
const content = assetFiles[joinedPath];
181+
const content = assetFiles[path.normalize(joinedPath)];
183182
if (content) {
184183
callback(null, Buffer.from(content, 'utf-8'));
185184
} else {

0 commit comments

Comments
 (0)