News for hackers. Stuff that matters.
Re:Microsoft Edge supports ES6 modules by koolba on Tuesday May 17, 2016 @02:28PM (#11716045)
Short of browser useragent sniffing (yuck...) is there any way to make use of ES6 features in a browser agnostic app? Seems like the only way to work is with a transpiler and series of polyfills.
Re:Microsoft Edge supports ES6 modules by wavefunction on Tuesday May 17, 2016 @03:55PM (#11716817)
Depending on the ES6 features and your supported browsers, you don't need anything.

If you want to use all the ES6 features, no single modern browser implements them all (Webkit is still lacking on modules) and so you will need to use a collection of polyfills.

Re:Microsoft Edge supports ES6 modules by Spivak on Tuesday May 17, 2016 @03:36PM (#11716640)
You could do something like

    try {
        eval('"use strict"; import "jquery";');
    } catch (e) {
        // No imports.
    }
but I wouldn't really recommend it.
Re:Microsoft Edge supports ES6 modules by MatthewPhillips on Tuesday May 17, 2016 @04:38PM (#11717212)
That won't work, you can't eval modules.
Re:Microsoft Edge supports ES6 modules by 33degrees on Tuesday May 17, 2016 @08:23PM (#11718762)
Given that transpilers give better performance at the moment, there's not much reason to use ES6 features natively for now.