Edge not loading ES 6 modules

懵懂的女人 提交于 2019-12-10 16:07:23

问题


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:


回答1:


  1. Navigate to about:flags
  2. Enable Enable experimental JavaScript features

And use <script type='module' src='./app.js'> will work.

source



来源:https://stackoverflow.com/questions/55546730/edge-not-loading-es-6-modules

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!