Skip to content

Commit 444be4c

Browse files
committed
Add es module export
1 parent b83b0a5 commit 444be4c

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

package.json

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@crystallize/reactjs-components",
33
"license": "MIT",
4-
"version": "1.4.1",
4+
"version": "1.5.0",
55
"author": "Crystallize <[email protected]> (https://crystallize.com)",
66
"contributors": [
77
"Håkon Krogh <[email protected]>",
@@ -10,29 +10,31 @@
1010
],
1111
"scripts": {
1212
"watch": "tsc -W",
13-
"build": "tsc",
13+
"build": "tsup src/index.ts --format esm,cjs --dts",
1414
"test": "jest",
1515
"bump": "yarn tsc && yarn version --no-git-tag-version --new-version"
1616
},
1717
"repository": {
1818
"type": "git",
1919
"url": "https://github.com/CrystallizeAPI/reactjs-components.git"
2020
},
21-
"main": "dist/index.js",
22-
"types": "dist/index.d.ts",
21+
"types": "./dist/index.d.ts",
22+
"main": "./dist/index.js",
23+
"module": "./dist/index.mjs",
24+
"peerDependencies": {
25+
"react": "*",
26+
"react-dom": "*"
27+
},
28+
"dependencies": {
29+
"@crystallize/js-api-client": "*"
30+
},
2331
"devDependencies": {
2432
"@tsconfig/node16": "^1.0.2",
2533
"@types/node": "^17.0.14",
2634
"@types/react": "^17 || ^18",
2735
"@types/react-dom": "^17 || ^18",
28-
"jest": "^27.5.1"
29-
},
30-
"dependencies": {
31-
"@crystallize/js-api-client": "*",
36+
"jest": "^27.5.1",
37+
"tsup": "^7.2.0",
3238
"typescript": "^4.5.5"
33-
},
34-
"peerDependencies": {
35-
"react": "*",
36-
"react-dom": "*"
3739
}
3840
}

0 commit comments

Comments
 (0)