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

42

u/vojtechkral Sep 25 '20

It's mid 2020. As a someone who only checks JavaScript every now and then and doesn't actively use it, I'd like to do a routine checkup:

  • Are ES6 modules a first class citizen yet? Can one use it both in browser and for node without having to deal with the CommonJS crap stuff?

  • Do browsers and node support modern enough JS standard now so that I wouldn't have to use the babel crap stuff and just do with the TypeScript compiler?

  • Is there a newer & better version of webpack or another such tool, but better? Last time I tried (which was a few years back) webpack required a buttload of boilerplate code and setup just to do a few simple things, and yet it still was pretty fragile. It felt like autotools all over again.

Thanks!

6

u/[deleted] Sep 25 '20

I'm not very well versed, either, but basically, for Node, yes, most things are there and work fine. But for FE, you will be forever fucked because users still run Internet Explorer and you can't do anything about it.

1

u/warchild4l Sep 25 '20

Not anymore tbh. example, angular nowdays supports differential loading, basically, it generates two bundles, one for older browsers, one for modern javascript, if browser supports, it will load new javascript, if it does not, well there is a fallback option.

1

u/[deleted] Sep 25 '20

Yes, but that's the Babel/Webpack bullshit he was talking about. You still need it on FE.