Skip to content

Commit

Permalink
build(connect-plugin-stellar): build for esm
Browse files Browse the repository at this point in the history
  • Loading branch information
karliatto committed Jan 31, 2025
1 parent 32b5beb commit 699cb7e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/connect-plugin-stellar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@
"publishConfig": {
"main": "lib/index.js"
},
"exports": {
"node": "./lib/index.js",
"default": "./libESM/index.js"
},
"files": [
"lib/"
"lib/",
"libESM"
],
"peerDependencies": {
"@stellar/stellar-sdk": "^12.1.3",
Expand All @@ -40,6 +45,8 @@
"scripts": {
"test:unit": "jest -c ../../jest.config.base.js",
"type-check": "yarn g:tsc --build tsconfig.json",
"build:lib": "yarn g:rimraf ./lib && yarn g:tsc --build tsconfig.lib.json && ../../scripts/replace-imports.sh ./lib"
"build:lib": "yarn build:lib:cjs && yarn build:lib:esm",
"build:lib:cjs": "yarn g:rimraf ./lib && yarn g:tsc --build tsconfig.lib.json && ../../scripts/replace-imports.sh ./lib",
"build:lib:esm": "yarn g:rimraf ./libESM && yarn g:tsc --build tsconfig.libESM.json && ../../scripts/replace-imports.sh ./libESM libESM"
}
}
8 changes: 8 additions & 0 deletions packages/connect-plugin-stellar/tsconfig.libESM.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"outDir": "libESM",
"module": "ESNext",
"target": "esnext",
}
}

0 comments on commit 699cb7e

Please sign in to comment.