Skip to content

Commit 8daafab

Browse files
OttoAllmendingerllm-git
andcommitted
feat(webpack): force ESM version of utxo-ord for browser bundles
Ensures proper import of wasm-utxo in browser environments by using the ESM version of utxo-ord. Issue: BTC-2936 Co-authored-by: llm-git <llm-git@ttll.de>
1 parent dea95c3 commit 8daafab

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

webpack/bitgojs.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ module.exports = {
1515
// use the default version here since we're webpacking ourselves
1616
'@bitgo/sdk-api': path.resolve('../sdk-api/dist/src/index.js'),
1717
async: path.resolve('../../node_modules/async/index.js'),
18-
// Force ESM version of wasm-utxo for browser bundles (has proper wasm import)
18+
// Force ESM versions for browser bundles - required for proper WASM initialization.
19+
// Note: We can't use global `conditionNames: ['browser', 'import', ...]` because
20+
// third-party packages like @solana/spl-token and @bufbuild/protobuf have broken ESM builds.
1921
'@bitgo/wasm-utxo': path.resolve('../../node_modules/@bitgo/wasm-utxo/dist/esm/js/index.js'),
22+
'@bitgo/utxo-ord': path.resolve('../utxo-ord/dist/esm/index.js'),
2023
},
2124
fallback: {
2225
constants: false,

0 commit comments

Comments
 (0)