Microsoft Edge doesn't load my ES 6 modules. All other browsers (Opera, Safari, Chrome, Firefox) do.
It downloads them all fine but doesn't run them. I see only the non-module file. And the console does not report any errors.
I am using Edge 17.17134 on Windows 10.
This page suggests that Microsoft Edge with build number 16299 and above supports ES6 modules. As you can see from my version information above, my build number is 17134, so it must support them.
My page has the following 3 scripts included:
<script src="/Scripts/my/IfIE.js"></script>
<script src="/Scripts/my/sathyaish.js" type="module"></script>
<script src="/Scripts/my/index.js" type="module"></script>
It downloads them all fine:
But it loads only the non-module script in the debugger:
ECMAScript 2015 (ES6) is Fully Supported on Microsoft Edge 17.
ES6 modules can be used without bundling out of the box on most modern browsers. The latest versions of Chrome, Firefox, Edge, Safari and mobile versions of them all support it out of the box. Other than Internet Explorer, most popular browsers can load ES6 modules on their own.
Safari, Chrome, Firefox and Edge all support the ES6 Modules import syntax. Here's what they look like. Simply add type="module" to your script tags and the browser will load them as ES Modules. The browser will follow all import paths, downloading and executing each module only once.
about:flags
Enable experimental JavaScript features
And use <script type='module' src='./app.js'>
will work.
source
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With