Skip to content

Commit 7ce28a5

Browse files
author
Sergey Khomushin
committed
package.json: add the cjs build & config
1 parent 3410cf2 commit 7ce28a5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
],
1010
"license": "MIT",
1111
"homepage": "https://www.emailjs.com",
12-
"main": "es/index.js",
12+
"main": "cjs/index.js",
1313
"types": "es/index.d.ts",
1414
"module": "es",
1515
"repository": {
@@ -20,11 +20,12 @@
2020
"node": ">=12.0.0"
2121
},
2222
"scripts": {
23-
"_clean": "rm -rf es && rm -rf dist",
23+
"_clean": "rm -rf es && rm -rf cjs && rm -rf dist",
2424
"_set-version": "./set-version.sh $npm_package_version",
25-
"_build-ts": "npm run _clean && tsc && npm run _set-version",
25+
"_build-ts": "tsc --declaration && npm run _set-version",
26+
"_build-cjs": "tsc --module commonjs --outDir cjs && npm run _set-version",
2627
"_build-bundle": "webpack --env production",
27-
"build": "npm run _build-ts && npm run _build-bundle",
28+
"build": "npm run _clean && npm run _build-ts && npm run _build-cjs && npm run _build-bundle",
2829
"test": "jest --coverage",
2930
"lint": "tsc --noEmit && eslint src"
3031
},

0 commit comments

Comments
 (0)