5 ms·
My take is that we're never going to see ES Modules in the wild in web apps as we know them today, outside of some tutorials or open source apps. There's too st
by Androider 6y ago
My take is that we're never going to see ES Modules in the wild in web apps as we know them today, outside of some tutorials or open source apps. There's too strong business incentives to the contrary, legitimate or not.
- RyanGoosling 6y agoBusiness incentives like supporting Internet Explorer for clients $$$?
- Androider 6y agoObfuscation. If web app companies could, they'd send your browser a binary instead of HTML and JS.
- hinkley 6y agowasm will give them everything they want in that department.
- uryga 6y agoisn't minification good enough at obfuscating the code? what does CommonJS add here? (that's a legit question – i've sifted through webpacked JS a few times, and it mostly just added a bunch of (function(module, require, ...) { <your module here> })(...) around the code. tedious to read, but not much in the way obfuscation) and i guess if ES Modules turned out to be more performant (bc the module stuff is handled by native browser code, or maybe some HTTP/2 magic with loading), that could be an incentive for adoption
- RyanGoosling 6y agoI've combed through minified JS a number of times. Not enough if you want to prevent someone from going through your shit.