ES6 Modules in Chrome M61+
Sam Thorogood

How to make browser with ES6 module support not to load script twice?

With ES6 module support, entry.jsis then entry module. And all source are bundled into bundle.js file. Below HTML snippet works for browsers that doesn’t support ES6 module.

<script type="module" src="/entry.js"></script>
<script type="text/javascript" src="/bundle.js"></script>

However, for browser supporting ES6 module, both entry.js and bundle.js are loaded.

So, how to handle that?