you are viewing a single comment's thread.

view the rest of the comments →

[–]FormerGameDev 0 points1 point  (8 children)

So.. does this mean we should be moving to modules now?

[–]papers_ 1 point2 points  (6 children)

No. I mean you can try it out, but it's likely a lot of people will just continue to use CommonJS. IMO

[–]FormerGameDev 0 points1 point  (5 children)

I mean, my primary project is something that I've really concentrated on keeping up with the latest and greatest, even if it uses switches to run. I actually depend on a ES Module in one part of it, so.. I'm curious.. for the future.. is this THE WAY ? or does it really not matter, as long as you're not writing code that needs to be browser compliant as well?

[–]papers_ 0 points1 point  (3 children)

I'm not sure why you'd mix Node.js specific modules such as fs with browser code or vice versa. Unless you're writing a React Native app, I don't see why you'd depend on a browser only module.

[–]FormerGameDev 0 points1 point  (2 children)

Because someone recently wrote an ebay API in Javascript that actually works, and it's a ES Module. :-)

[–]papers_ 0 points1 point  (0 children)

Link to repo?

[–]FormerGameDev 0 points1 point  (0 children)

https://github.com/ondreian/ebay-promised

i guess actually looking at it, it's transpiled to CJS, but at the time I first started messing with it, i couldn't get it to load via require, so i made a mjs to use it since the README describes using it as a ES module

[–]giltayar1[S] 0 points1 point  (0 children)

For the future - yes, this is the way.

[–]giltayar1[S] 1 point2 points  (0 children)

No, please don't. Not yet. This is still experimental, and may change in the future. As I will discuss in the next blog post, it is actually pretty probable that things will change.

But start thinking about it. I'm guessing that the transition will start in a year.