Skip to content

Commit

Permalink
feat: supporting esm import (#824)
Browse files Browse the repository at this point in the history
* feat: supporting esm import
add the exports in package.json to support esm import for js and ts

* feat: support for .js module export
adding the support for .js module exports and support for types, nextjs, framework and recipe module exports
  • Loading branch information
anuragmerndev authored Jun 7, 2024
1 parent fb3ffa7 commit eada4be
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,52 @@
"type": "git",
"url": "git+https://github.com/supertokens/supertokens-node.git"
},
"exports": {
".": {
"types": "./index.d.ts",
"default": "./index.js"
},
"./framework/*": {
"types": "./framework/*/index.d.ts",
"default": "./framework/*/index.js"
},
"./framework/*/index.js": {
"types": "./framework/*/index.d.ts",
"default": "./framework/*/index.js"
},
"./nextjs": {
"types": "./nextjs/index.d.ts",
"default": "./nextjs/index.js"
},
"./nextjs/index.js": {
"types": "./nextjs/index.d.ts",
"default": "./nextjs/index.js"
},
"./types": {
"types": "./types/index.d.ts",
"default": "./types/index.js"
},
"./types/index.js": {
"types": "./types/index.d.ts",
"default": "./types/index.js"
},
"./lib/*": {
"types": "./lib/*/index.d.ts",
"default": "./lib/*/index.js"
},
"./lib/*.js": {
"types": "./lib/*.d.ts",
"default": "./lib/*.js"
},
"./recipe/*": {
"types": "./recipe/*/index.d.ts",
"default": "./recipe/*/index.js"
},
"./recipe/*/index.js": {
"types": "./recipe/*/index.d.ts",
"default": "./recipe/*/index.js"
}
},
"author": "rishabhpoddar",
"license": "Apache-2.0",
"bugs": {
Expand Down

0 comments on commit eada4be

Please sign in to comment.