diff --git a/package.json b/package.json index 07c4f86c..126d077c 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/tsconfig.json b/tsconfig.json index 89f1157b..e9a43ecc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -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": [