Skip to content

Commit 0dd2e40

Browse files
authored
Merge pull request #196 from BitGo/BTC-3110.wasm-dot-esm-extensions
fix: add .js extensions to ESM relative imports
2 parents ca622cb + d0dbb08 commit 0dd2e40

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

packages/wasm-dot/js/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
MaterialJs,
1515
ValidityJs,
1616
ParseContextJs,
17-
} from "./wasm/wasm_dot";
17+
} from "./wasm/wasm_dot.js";
1818

1919
// Export WASM classes for advanced usage
2020
export {
@@ -27,7 +27,7 @@ export {
2727
};
2828

2929
// Re-export all public API
30-
export * from "./types";
31-
export * from "./transaction";
32-
export * from "./parser";
33-
export * from "./builder";
30+
export * from "./types.js";
31+
export * from "./transaction.js";
32+
export * from "./parser.js";
33+
export * from "./builder.js";

packages/wasm-dot/js/parser.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* Use parseTransaction() when you need decoded data.
88
*/
99

10-
import { ParserNamespace, MaterialJs, ParseContextJs } from "./wasm/wasm_dot";
11-
import type { DotTransaction } from "./transaction";
12-
import type { ParseContext, ParsedTransaction } from "./types";
10+
import { ParserNamespace, MaterialJs, ParseContextJs } from "./wasm/wasm_dot.js";
11+
import type { DotTransaction } from "./transaction.js";
12+
import type { ParseContext, ParsedTransaction } from "./types.js";
1313

1414
/**
1515
* Parse a DOT transaction into structured data.

packages/wasm-dot/js/transaction.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
* TypeScript wrapper for WasmTransaction
33
*/
44

5-
import { WasmTransaction, MaterialJs, ValidityJs, ParseContextJs } from "./wasm/wasm_dot";
6-
import type { Material, Validity, Era } from "./types";
7-
import { AddressFormat } from "./types";
5+
import { WasmTransaction, MaterialJs, ValidityJs, ParseContextJs } from "./wasm/wasm_dot.js";
6+
import type { Material, Validity, Era } from "./types.js";
7+
import { AddressFormat } from "./types.js";
88

99
/**
1010
* DOT Transaction wrapper

0 commit comments

Comments
 (0)