Skip to content

Commit

Permalink
fix: improve compatibility with node16 module resolution (#711)
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerbutler committed Nov 6, 2023
1 parent 3dcb88c commit 46ef851
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions package.json
Expand Up @@ -12,14 +12,24 @@
"./dist/engine.io.min.js": "./dist/engine.io.min.js",
".": {
"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
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 46ef851

Please sign in to comment.