My Learning Curve

Feed / Lea Verou's blog

Import non-ESM libraries in ES Modules, with client-side vanilla JS

Monday, July 20, 2020

In case you haven’t heard, ECMAScript modules (ESM) are now supported everywhere!

While I do have some gripes with them, it’s too late for any of these things to change, so I’m embracing the good parts and have cautiously started using them in new projects. I do quite like that I can just use import statements and dynamic import() for dependencies with URLs right from my JS, without module loaders, extra