Skip to content

Instantly share code, notes, and snippets.

View justinribeiro's full-sized avatar
🌞
Web Performance Tracing: because we can have nice things if you work for it.

Justin Ribeiro justinribeiro

🌞
Web Performance Tracing: because we can have nice things if you work for it.
View GitHub Profile
@justinribeiro
justinribeiro / feature_detect_es_modules.js
Created November 22, 2017 23:21 — forked from ebidel/feature_detect_es_modules.js
Feature detect ES modules: both static import and dynamic import()
<!--
Complete feature detection for ES modules. Covers:
1. Static import: import * from './foo.js';
2. Dynamic import(): import('./foo.js').then(module => {...});
Demo: http://jsbin.com/tilisaledu/1/edit?html,output
Thanks to @_gsathya, @kevincennis, @rauschma, @malyw for the help.
-->