Skip to content

Commit 0919317

Browse files
kevmo314claude
andauthored
fix: add proper dual package exports for CommonJS and ESM (#294)
Co-authored-by: Claude <[email protected]>
1 parent 6c335fc commit 0919317

File tree

4 files changed

+92
-195
lines changed

4 files changed

+92
-195
lines changed

api/package-lock.json

Lines changed: 40 additions & 189 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@rtirl/api",
33
"version": "1.2.1",
44
"main": "lib/index.js",
5+
"module": "lib/index.mjs",
56
"browser": "lib/index.min.js",
67
"types": "lib/index.d.ts",
78
"scripts": {
@@ -12,7 +13,12 @@
1213
"lib/**/*"
1314
],
1415
"exports": {
15-
".": "./lib"
16+
".": {
17+
"types": "./lib/index.d.ts",
18+
"import": "./lib/index.mjs",
19+
"require": "./lib/index.js",
20+
"browser": "./lib/index.min.js"
21+
}
1622
},
1723
"author": "[email protected]",
1824
"license": "MIT",
@@ -25,7 +31,7 @@
2531
"@rollup/plugin-typescript": "^11.1.6",
2632
"prettier": "^3.3.2",
2733
"rollup": "^4.18.0",
28-
"rollup-plugin-terser": "^7.0.2",
34+
"@rollup/plugin-terser": "^0.4.4",
2935
"typescript": "^5.4.5"
3036
},
3137
"description": "Client API library for rtirl.com"

0 commit comments

Comments
 (0)