Skip to content

Commit

Permalink
feat: added cjs and esm build commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayesh2812 committed Jan 8, 2024
1 parent 562dbde commit fc13a6a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
"version": "2.0.5",
"description": "This Package converts Html Document to Json and vice-versa.",
"main": "lib/index.js",
"module": "lib/index.mjs",
"types": "lib/index.d.ts",
"scripts": {
"test": "jest",
"prepare": "npm run build",
"build": "esbuild src/index.tsx --bundle --outdir=lib --minify && tsc --emitDeclarationOnly --outDir lib"
"build:cjs": "esbuild src/index.tsx --bundle --outdir=lib --platform=node --minify",
"build:esm": "esbuild src/index.tsx --bundle --outdir=lib --format=esm --out-extension:.js=.mjs --minify",
"build": "npm run build:cjs && npm run build:esm && tsc --emitDeclarationOnly --outDir lib"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit fc13a6a

Please sign in to comment.