Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make an es6 version also #1378

Closed
OSG-Proj opened this issue Jul 19, 2020 · 4 comments
Closed

Make an es6 version also #1378

OSG-Proj opened this issue Jul 19, 2020 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@OSG-Proj
Copy link

Note: for support questions, please use one of these channels: stackoverflow or slack

For bug reports and feature requests for the Swift client, please open an issue there.

For bug reports and feature requests for the Java client, please open an issue there.

You want to:

  • [] report a bug
  • [x ] request a feature

Current behaviour

What is actually happening?
I can see that this is a commonjs module, webpack supports interoptability across modules, but isnt recommended.

Steps to reproduce (if the current behaviour is a bug)

Note: the best way (and by that we mean the only way) to get a quick answer is to provide a failing test case by forking the following fiddle.

Expected behaviour

What is expected?
There should be es6 exports instead of module.exports for use in the browser, due to the fact socket.io-client is a client side portion of socket.io.

Setup

  • OS: windows 10
  • browser: chrome
  • socket.io version: 2.3.0

Other information (e.g. stacktraces, related issues, suggestions how to fix)

@darrachequesne
Copy link
Member

Sounds reasonable. Let's add this 👍

@eouia
Copy link

eouia commented Sep 11, 2020

Although bundling(webpack, browsify,...) would be still a good but legacy approach, a native ES6 module supporting would be needed also. I voted to this.

@darrachequesne darrachequesne added the enhancement New feature or request label Sep 30, 2020
@MickL
Copy link
Contributor

MickL commented Jan 5, 2021

Angular CLI even throws a warning:

Warning: /folder/myfile.ts depends on 'socket.io-client'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

@darrachequesne
Copy link
Member

This was implemented in 16b6569, included in [email protected].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants