User tests: Successful: Unsuccessful:
Pull Request for Issue # .
@jakearchibald
https://jakearchibald.com/2017/es-modules-in-browsers/
Since we already have a project to convert the javascript files to ES6 I thought it will be good to also start the discussion about delivering that code to the browser.
There is a really painful problem with imports:
@dneukirchen @yvesh and me had a discussion about possible solutions but I wanted to get more ideas before starting coding them for benchmarking...
Apply this path and try to create or edit a banner.
Observe the head that you have:

Everything works.
Repeat in IE6...
Also removed the conditionals as those are dropped in IE10 and Joomla 4 support >IE11
| Status | New | ⇒ | Pending | 
| Category | ⇒ | Libraries JavaScript | 
| Labels | Added: 
?
? | ||
 
                 
                @Fedik the thing is that we automatically check if there is an ES6 version of each file and then create both tags (type="module" and for fallback nomodule). Passing the attribute when adding a script will only load the one version, but for compatibility we still need both script tags. Maybe there is a better way, this was late night code...
| Status | Pending | ⇒ | Closed | 
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-09 09:37:31 | 
| Closed_By | ⇒ | dgrammatiko | 
hmm, if I right understood the code, you assume that every ES6 script is a module, but it is not? 
And I think will be more smart to use attribute
array('type' => 'module')when add new script to document with$doc->addScript(), than hackypreg_match.just my first thoughts, not tested