Skip to content

Commit

Permalink
chore: add an ES module wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Oct 8, 2021
1 parent 64d5754 commit 401f4b6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
"name": "engine.io",
"version": "5.2.0",
"description": "The realtime engine behind Socket.IO. Provides the foundation of a bidirectional connection between client and server",
"type": "commonjs",
"main": "./build/engine.io.js",
"types": "./build/engine.io.d.ts",
"exports": {
"import": "./wrapper.mjs",
"require": "./build/engine.io.js"
},
"author": "Guillermo Rauch <guillermo@learnboost.com>",
"homepage": "https://github.com/socketio/engine.io",
"contributors": [
Expand Down Expand Up @@ -62,7 +67,8 @@
"url": "git@github.com:socketio/engine.io.git"
},
"files": [
"build/"
"build/",
"wrapper.mjs"
],
"engines": {
"node": ">=10.0.0"
Expand Down
3 changes: 3 additions & 0 deletions wrapper.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import lib from "./build/engine.io.js";

export const { Server, Socket, Transport, transports, listen, attach, parser, protocol } = lib;

0 comments on commit 401f4b6

Please # to comment.