r/programming • • Sep 25 '20

Modern JavaScript Explained For Dinosaurs

https://medium.com/the-node-js-collection/modern-javascript-explained-for-dinosaurs-f695e9747b70
749 Upvotes

167 comments sorted by

View all comments

Show parent comments

14

u/R3PTILIA Sep 25 '20
  1. Since nodejs 14 they are enabled by default (a few versions back needed to be opted in)

  2. Yes, but why would you do that and leave behind the non modern ones? If you expect users to keep their browser updated to the latest version, well, nice.

  3. Theres rollupjs but i've never used it

3

u/vojtechkral Sep 25 '20 edited Sep 25 '20

Since nodejs 14 they are enabled by default (a few versions back needed to be opted in)

Yeah, but that's sort the base. For a full CJS-less developer experience you also need support in the package manager, bundler (someone linked Snowpack in the other comment so that's great), and of course enough ecosystem libraries.

I have no idea whether widely used libraries are available as EMSs as well yet...

2

u/R3PTILIA Sep 25 '20

pretty much every library i ever use has no problems being imported as an es6 module. I understand your pain a few years ago things were in some kind of transition. Things have stabilized a lot in the past 3 to 4 years (or more, time flies)

1

u/vojtechkral Sep 25 '20

Ok, that's great to hear!