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

ES Module Support? #762

Closed
Justsnoopy30 opened this issue Jun 4, 2020 · 11 comments
Closed

ES Module Support? #762

Justsnoopy30 opened this issue Jun 4, 2020 · 11 comments
Labels
question This issue asks a question or requests usage support

Comments

@Justsnoopy30
Copy link

Is there a possibility of this project supporting ES Modules?

@Qix-
Copy link
Member

Qix- commented Jun 4, 2020

Not for a while, sorry. Perhaps in version 6.

EDIT: Let me expand on that - ESM isn't well supported yet, both by tooling and by teams. debug is one of the most depended upon modules on npm, and since version 5 is meant to be a compatibility-oriented major release, it's kind of important to keep it CJS for now so as to not alienate other users.

@Qix- Qix- added the question This issue asks a question or requests usage support label Jun 4, 2020
@Justsnoopy30
Copy link
Author

Oh.

@Justsnoopy30
Copy link
Author

Could someone possibly could make a fork with ESM support I could use?

@Justsnoopy30
Copy link
Author

Or another branch labeled ESM-Support?

@Qix-
Copy link
Member

Qix- commented Jun 4, 2020

@Justsnoopy30 Please don't double- or triple-post.

Can you explain why ESM support is an absolute requirement for you?

@Justsnoopy30
Copy link
Author

My entire project uses ESM. I do not use a bundler, so there is basically no way to import this on the browser as it doesn't provide an ESM export.

@Qix-
Copy link
Member

Qix- commented Jun 4, 2020

I'm not sure how to help, unfortunately. Someone can fork, but I don't recommend it. Industry standard at the moment is to use a bundler.

@Qix- Qix- closed this as completed Jun 4, 2020
@Justsnoopy30
Copy link
Author

Justsnoopy30 commented Jun 4, 2020

Okay. I ended up getting what I wanted through a website which generates ESM compliant versions of npm packages, which I then downloaded and now I can import it as an ES Module!

@muuvmuuv
Copy link

muuvmuuv commented Jul 9, 2020

It is a requirement for projects like Angular where the compiler uses ES Syntax and libs that are ES invalid because of one dependency that is not ES. Lodash did it greatly by providing an extra package called "lodash-es".

Ref: socketio/socket.io-client#1375

@FossPrime
Copy link

FossPrime commented Sep 12, 2022

Sorry to grave dig, but why was this closed as "completed"? As of TS 4.7, native ES Modules have full stack support, which means HMR bundlers and watchers like esbuild-kit/tsx and vite SSR now work orders of magnitude faster than what webpack+babel+nodemon could.

The problem is still at large from my testing, so not "completed": https://stackblitz.com/fork/github/feathersjs/playground/tree/037fe54/vite-chat with DEBUG="feathers:*" npm run dev

Like you said, bundlers are industry standard... and they work WAY better with ES Modules. To the point that it's worth taking any measures to switch to them ASAP.

@Qix-
Copy link
Member

Qix- commented Sep 12, 2022

Github didn't have close reasons at the time of closure, and when they introduced the feature defaulted all closed issues as "completed" as a sane default. Clearly no work was actually completed.

See #786 (comment) about ESM.

@debug-js debug-js locked as resolved and limited conversation to collaborators Sep 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question This issue asks a question or requests usage support
Development

No branches or pull requests

4 participants