modernweb-dev / web

Guides, tools and libraries for modern web development.
https://modern-web.dev
MIT License
2.22k stars 291 forks source link

[dev-server-legacy] Legacy Edge needs globalThis polyfill #1265

Open kevinpschaaf opened 3 years ago

kevinpschaaf commented 3 years ago

One of the (many) things that the CoreJS polyfills provide is a globalThis polyfill, which is needed on legacy Edge. However, the current polyfill test for loading CoreJS is the 'noModule' in HTMLScriptElement.prototype test, which unfortunately passes for legacy Edge (e.g. Edge 18).

Would you consider adding the globalThis test to loading the CoreJS polyfill (e.g. 'globalThis' in window) so that legacy Edge gets that polyfill?

LarsDenBakker commented 3 years ago

The question with extending the detection bar is always how far do we want to go. Including legacy edge makes sense to me though.