Skip to content

Commit

Permalink
Merge pull request #61 from derrickreimer/fix-package-config
Browse files Browse the repository at this point in the history
Reconfigure ESM and CJS exports
  • Loading branch information
derrickreimer authored Jul 10, 2024
2 parents 4a9a6fa + 3f91c60 commit cd238ce
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 cd238ce

Please sign in to comment.