Skip to content

Commit 1b36eaf

Browse files
committed
feat: added cjs and esm build commands
1 parent ed13de7 commit 1b36eaf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33
"version": "2.0.5",
44
"description": "This Package converts Html Document to Json and vice-versa.",
55
"main": "lib/index.js",
6+
"module": "lib/index.mjs",
7+
"types": "lib/index.d.ts",
68
"scripts": {
79
"test": "jest",
810
"prepare": "npm run build",
9-
"build": "esbuild src/index.tsx --bundle --outdir=lib --minify && tsc --emitDeclarationOnly --outDir lib"
11+
"build:cjs": "esbuild src/index.tsx --bundle --outdir=lib --platform=node --minify",
12+
"build:esm": "esbuild src/index.tsx --bundle --outdir=lib --format=esm --out-extension:.js=.mjs --minify",
13+
"build": "npm run build:cjs && npm run build:esm && tsc --emitDeclarationOnly --outDir lib"
1014
},
1115
"repository": {
1216
"type": "git",

0 commit comments

Comments
 (0)