From 6308d2896d3b6d975d5baee7c23867548edca258 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Thu, 10 Aug 2023 14:41:46 -0400 Subject: [PATCH] fix(bindgen): Filter wasm binaries generated from library targets --- src/itk-wasm-cli.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/itk-wasm-cli.js b/src/itk-wasm-cli.js index e908ae1e6..40c05a611 100755 --- a/src/itk-wasm-cli.js +++ b/src/itk-wasm-cli.js @@ -251,7 +251,9 @@ function bindgen(options) { } // Building for emscripten can generate duplicate .umd.wasm and .wasm binaries - let filteredWasmBinaries = wasmBinaries.filter(binary => !binary.endsWith('.umd.wasm')) + // Also filter libraries. + let filteredWasmBinaries = wasmBinaries.filter(binary => !binary.endsWith('.umd.wasm') && !path.basename(binary).startsWith('lib')) + console.log(filteredWasmBinaries) switch (iface) { case 'typescript':