Skip to content

Commit

Permalink
fix(ts-bindings): package.json needs type: module
Browse files Browse the repository at this point in the history
Since we started using `module: nodenext` in tsconfig.json, we need to
tell libraries that import these ones that the exported code is an ES
Module.

This fixes github.com/stellar/soroban-astro-template to work with
libraries generated with `soroban contract bindings typescript`
  • Loading branch information
chadoh committed May 20, 2024
1 parent 8db6145 commit a6b35b2
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{
"version": "0.0.0",
"name": "INSERT_CONTRACT_NAME_HERE",
"type": "module",
"exports": "./dist/index.js",
"typings": "dist/index.d.ts",
"scripts": {
"build": "tsc"
},
"dependencies": {
"@stellar/freighter-api": "2.0.0",
"buffer": "6.0.3",
"@stellar/stellar-sdk": "12.0.0-rc.3"
},
"scripts": {
"build": "tsc"
},
"exports": "./dist/index.js",
"typings": "dist/index.d.ts",
"devDependencies": {
"typescript": "5.3.3"
}
}
}

0 comments on commit a6b35b2

Please sign in to comment.