Skip to content

Commit 8744fad

Browse files
committed
fixup! chore: add tsc-alias to make dist/esm files imports complient with latest node.js versions
1 parent 2d80d04 commit 8744fad

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

packages/cardano-services-client/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"license": "Apache-2.0",
2222
"scripts": {
2323
"build": "yarn build:cjs && tsc -p src/tsconfig.json --outDir ./dist/esm --module es2020 && tsc-alias -p src/tsconfig.json --outDir ./dist/esm && cp ../../build/esm-package.json ./dist/esm/package.json",
24-
"build:cjs": "yarn build:version && tsc --build src && cp ../../build/cjs-package.json ./dist/cjs/package.json",
24+
"build:cjs": "yarn build:version && tsc --build src && cp ./package.json dist/ && cp ../../build/cjs-package.json ./dist/cjs/package.json",
2525
"build:version": "bash -c 'if node ./scripts/createVersionSource.js --check ; then node ./scripts/createVersionSource.js --create && yarn lint:fix ; fi'",
2626
"tscNoEmit": "echo typescript --noEmit command not implemented yet",
2727
"cleanup:dist": "rm -rf dist",

packages/cardano-services-client/src/tsconfig.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"extends": "../../../tsconfig.json",
33
"compilerOptions": {
4-
"outDir": "../dist/cjs",
5-
"resolveJsonModule": true
4+
"outDir": "../dist/cjs"
65
},
76
"references": [
87
{
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
declare module '*.json';
2+
3+
// exclude from build, as it has to be imported at runtime
4+
declare module '../package.json';

0 commit comments

Comments
 (0)