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 30, 2025
1 parent e3d1009 commit 59214b8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/connect-plugin-stellar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
"publishConfig": {
"main": "lib/index.js"
},
"exports": {
"node": "./lib/index.js",
"default": "./libESM/index.js"
},
"files": [
"lib/"
],
Expand All @@ -40,6 +44,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"
}
}
7 changes: 7 additions & 0 deletions packages/connect-plugin-stellar/tsconfig.libESM.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"outDir": "libESM",
"module": "ESNext"
}
}

0 comments on commit 59214b8

Please sign in to comment.