From ca4c511227f095040d93250fb054cf93afb93c96 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 25 Jun 2024 18:47:34 +0100 Subject: [PATCH] Build: Don't try to encode WASM as UTF-8 when copying it --- extensions/ql-vscode/gulpfile.ts/typescript.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/ql-vscode/gulpfile.ts/typescript.ts b/extensions/ql-vscode/gulpfile.ts/typescript.ts index 5cebaa67e..c7f127855 100644 --- a/extensions/ql-vscode/gulpfile.ts/typescript.ts +++ b/extensions/ql-vscode/gulpfile.ts/typescript.ts @@ -77,5 +77,8 @@ export function copyWasmFiles() { // to configure the path to the WASM file. So, source-map will always load the file from `__dirname/mappings.wasm`. // In version 0.8.0, it may be possible to do this properly by calling SourceMapConsumer.initialize by // using the "browser" field in source-map's package.json to load the WASM file from a given file path. - return src("node_modules/source-map/lib/mappings.wasm").pipe(dest("out")); + return src("node_modules/source-map/lib/mappings.wasm", { + // WASM is a binary format, so don't try to re-encode it as text. + encoding: false, + }).pipe(dest("out")); }