-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change allows us to: - reduce the size of the bundle - provide an ESM bundle (for usage in <script type="module">) BREAKING CHANGE: due to how default export works with ES modules, we have removed the default export of the library, which means the following code: ```js require("engine.io-client")(...); ``` will not work anymore. The named export must be used instead: ```js const { Socket } = require("engine.io-client); // or import { Socket } from "engine.io-client"; const socket = new Socket(...); ``` Note: the UMD build still exposes a function though: ```html <script src="/path/to/engine.io.js"></script> <script> const socket = eio(...); </script> ``` Note: webpack is still used with zuul because of the custom builder (zuul-builder-webpack)
- Loading branch information
1 parent
221433e
commit 27de300
Showing
14 changed files
with
391 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { Socket } from "./socket.js"; | ||
|
||
export default (uri, opts) => new Socket(uri, opts); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.