Skip to content

Commit

Permalink
fix: include instructions for CJS
Browse files Browse the repository at this point in the history
  • Loading branch information
HashMapsData2Value committed Jan 21, 2025
1 parent 623b36e commit 7cbdf23
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
README.md
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,28 @@ $ yarn
$ yarn test
```

## Regarding CJS

This library can be used in a CommonJS as a dynamic import:

```ts
;(async function () {
const hd = await import("@algorandfoundation/xhd-wallet-api");
})();
```

Make sure to set your tsconfig.json so it is at least:

```json
{
"target": "es2020",
"module": "Node16",
"moduleResolution": "Node16"
}
```

# Test

## Output

```shell
Expand Down

0 comments on commit 7cbdf23

Please sign in to comment.