Skip to content

Commit 420b2dc

Browse files
fix(wasm-utxo): set rootDir in tsconfig to fix output directory structure
TypeScript was preserving the js/ source directory in the output, creating dist/esm/js/index.js instead of dist/esm/index.js. Setting rootDir: './js' ensures the compiled files are placed directly in the output directory. This fixes the module resolution error in wasm-utxo-ui where webpack couldn't find '@bitgo/wasm-utxo' because the expected export paths didn't match the actual file locations.
1 parent 0b361b9 commit 420b2dc

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

packages/wasm-utxo/tsconfig.cjs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"compilerOptions": {
44
"module": "CommonJS",
55
"moduleResolution": "node",
6+
"rootDir": "./js",
67
"outDir": "./dist/cjs"
78
}
89
}

packages/wasm-utxo/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"skipLibCheck": true,
99
"declaration": true,
1010
"composite": true,
11+
"rootDir": "./js",
1112
"outDir": "./dist/esm"
1213
},
1314
"include": ["./js/**/*.ts"],

0 commit comments

Comments
 (0)