Skip to content

Commit 94b6476

Browse files
authored
fix(react-query): Build CJS and ESM version (#77)
1 parent 38a71f4 commit 94b6476

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

.yarn/versions/8635ba24.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
releases:
2+
"@typoas/react-query": patch

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
---
66

7+
## 4.2.1 - 2025-02-12
8+
9+
> Only @typoas/react-query was updated to 4.2.1
10+
11+
- fix(react-query): Build CJS and ESM version [#77](https://github.com/Embraser01/typoas/pull/77)
12+
713
## 4.2.0 - 2025-02-10
814

915
> All packages were updated to 4.2.0

packages/typoas-react-query/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
"directory": "packages/typoas-react-query"
99
},
1010
"main": "./src/index.ts",
11+
"module": "./lib/esm/index.js",
1112
"scripts": {
12-
"prepack": "tsc",
13+
"prepack": "tsc --module esnext --outDir ./lib/esm && tsc --outDir ./lib/cjs",
1314
"start": "ts-node ./src/bin.ts",
1415
"test:types": "tsc --noEmit",
1516
"test:jest": "jest"
@@ -40,7 +41,8 @@
4041
"!/lib/**/__tests__/*"
4142
],
4243
"publishConfig": {
43-
"main": "./lib/index.js",
44-
"types": "./lib/index.d.ts"
44+
"main": "./lib/cjs/index.js",
45+
"module": "./lib/esm/index.js",
46+
"types": "./lib/esm/index.d.ts"
4547
}
4648
}

packages/typoas-react-query/tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"compilerOptions": {
33
"strict": true,
44
"module": "commonjs",
5+
"moduleResolution": "node",
56
"target": "ES2019",
67
"declaration": true,
78
"lib": ["ES2019", "DOM"],
8-
"outDir": "lib",
9-
"jsx": "react-jsx",
10-
"resolveJsonModule": true
9+
"outDir": "lib/cjs",
10+
"jsx": "react-jsx"
1111
},
1212
"exclude": ["node_modules", "lib"]
1313
}

0 commit comments

Comments
 (0)