Skip to content

Commit

Permalink
fix: improve compatibility with node16 module resolution (#1595)
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerbutler authored Nov 6, 2023
1 parent d00ccd2 commit 605de78
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
17 changes: 13 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,25 @@
"./dist/socket.io.js": "./dist/socket.io.js",
"./dist/socket.io.js.map": "./dist/socket.io.js.map",
".": {
"types": "./build/esm/index.d.ts",
"import": {
"types": "./build/esm/index.d.ts",
"node": "./build/esm-debug/index.js",
"default": "./build/esm/index.js"
},
"require": "./build/cjs/index.js"
"require": {
"types": "./build/cjs/index.d.ts",
"default": "./build/cjs/index.js"
}
},
"./debug": {
"import": "./build/esm-debug/index.js",
"require": "./build/cjs/index.js"
"import": {
"types": "./build/esm/index.d.ts",
"default": "./build/esm-debug/index.js"
},
"require": {
"types": "./build/cjs/index.d.ts",
"default": "./build/cjs/index.js"
}
}
},
"types": "./build/esm/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"outDir": "build/cjs/",
"target": "es2018", // Node.js 10 (https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping)
"module": "commonjs",
"declaration": false,
"declaration": true,
"esModuleInterop": true
},
"include": [
Expand Down

0 comments on commit 605de78

Please sign in to comment.