Skip to content

Commit

Permalink
Reconfigure ESM and CJS exports
Browse files Browse the repository at this point in the history
  • Loading branch information
derrickreimer committed Jul 9, 2024
1 parent 4a9a6fa commit 3f91c60
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@
"dist",
"types"
],
"main": "dist/fathom-client.js",
"type": "module",
"module": "dist/fathom-client.esm.js",
"main": "dist/fathom-client.cjs",
"exports": {
"import": "./dist/fathom-client.esm.js",
"require": "./dist/fathom-client.cjs"
},
"types": "types/index.d.ts",
"scripts": {
"build": "npm run build:types && npm run build:cjs && npm run build:esm",
"build:cjs": "esbuild src/index.ts --bundle --format=cjs --outfile=dist/fathom-client.js",
"build:cjs": "esbuild src/index.ts --bundle --format=cjs --outfile=dist/fathom-client.cjs",
"build:esm": "esbuild src/index.ts --bundle --format=esm --outfile=dist/fathom-client.esm.js",
"build:types": "tsc --emitDeclarationOnly",
"lint": "npx tsc --noEmit && npx prettier src -c",
Expand Down

0 comments on commit 3f91c60

Please sign in to comment.