Skip to content

Commit

Permalink
feat: add module field in package.json to fix #84
Browse files Browse the repository at this point in the history
  • Loading branch information
DrewHoo committed Jul 11, 2024
1 parent 6da9a19 commit cfab648
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"lib/**/*"
],
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.js",
"types": "./lib/cjs/index.d.ts",
"exports": {
"require": {
Expand All @@ -24,7 +25,7 @@
},
"import": {
"types": "./lib/esm/index.d.ts",
"default": "./lib/esm/index.mjs"
"default": "./lib/esm/index.js"
},
"default": "./lib/cjs/index.js"
},
Expand All @@ -44,7 +45,7 @@
"scripts": {
"clean": "rm -rf ./lib",
"build": "pnpm run clean && pnpm run build:esm && pnpm run build:cjs",
"build:esm": "tsc -p tsconfig.esm.json && mv lib/esm/index.js lib/esm/index.mjs",
"build:esm": "tsc -p tsconfig.esm.json",
"build:cjs": "tsc -p tsconfig.cjs.json",
"prepack": "pnpm run build",
"test": "vitest",
Expand Down

0 comments on commit cfab648

Please sign in to comment.