Skip to content

Commit e6aa1a3

Browse files
fix: point towards the CommonJS types
In order to fix the following issue: > error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("@socket.io/component-emitter")' call instead. > > 1 import { Emitter } from "@socket.io/component-emitter"; This problem was introduced in [1], when reworking the dual packaging. Related: socketio/socket.io-parser#132 [1]: ba6b56d
1 parent c68478d commit e6aa1a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"main": "./lib/cjs/index.js",
1616
"module": "./lib/esm/index.js",
17-
"types": "./lib/esm/index.d.ts",
17+
"types": "./lib/cjs/index.d.ts",
1818
"repository": {
1919
"type": "git",
2020
"url": "https://github.com/socketio/emitter.git"

0 commit comments

Comments
 (0)