Skip to content

Commit

Permalink
Remove EventEmitter from roslib.js bundle
Browse files Browse the repository at this point in the history
I'm not sure why, but EventEmitter is included within roslib.js. It
should be a dependency according to all the readmes. This change excludes it from the bundle.

| name | roslib.js | roslib.min.js |
|------|-----------|---------------|
| old  | 132K      | 53K           |
| new  | 107K      | 42K           |
  • Loading branch information
Rayman authored and MatthijsBurgh committed Nov 1, 2022
1 parent bdb37ce commit c16db14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"main": "./src/RosLibNode.js",
"browser": {
"./src/RosLibNode.js": "./src/RosLib.js",
"eventemitter2": "./src/util/shim/EventEmitter2.js",
"canvas": "./src/util/shim/canvas.js",
"ws": "./src/util/shim/WebSocket.js",
"@xmldom/xmldom": "./src/util/shim/@xmldom/xmldom.js",
Expand Down
3 changes: 3 additions & 0 deletions src/util/shim/EventEmitter2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
EventEmitter2: window.EventEmitter2
};

0 comments on commit c16db14

Please # to comment.