Skip to content

Commit

Permalink
fix: Allow for ESM and CommonJS usage thanks to pkgroll
Browse files Browse the repository at this point in the history
  • Loading branch information
fearandesire committed Jun 22, 2024
1 parent 8357d17 commit 62ee20b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
20 changes: 14 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@
"name": "resolve-team",
"version": "1.8.3",
"description": "Resolve NBA & NFL sports team names and information via fuzzy search",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"module": "dist/index.js",
"type": "module",
"exports": {
".": "./dist/index.js"
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "tsc",
"build": "pkgroll",
"test": "jest",
"dev": "tsx ./src/index.ts",
"husky": "node ./node_modules/husky/lib/bin.js",
Expand Down Expand Up @@ -58,6 +65,7 @@
"husky": "^8.0.0",
"jest": "^29.7.0",
"lint-staged": "^15.2.2",
"pkgroll": "^2.1.1",
"prettier": "^3.2.5",
"release-it": "^17.3.0",
"release-it-changelogen": "^0.1.0",
Expand Down Expand Up @@ -90,4 +98,4 @@
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
}
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { resolveTeam } from './resolver'
import { resolveTeam } from './resolver.js'

export { resolveTeam }

0 comments on commit 62ee20b

Please sign in to comment.