JavaScript modules, the good, the bad and the ugly 🧐
If you ever stumbled upon a piece of vanilla JavaScript code and wanted to refactor it to a module, or have a CommonJS
module and want to convert it to ES6 Modules
, you might have faced a couple of tricky situations. I had to go through one of those recently and stumbled upon some differences/points that you need to be aware of when working with modules. As always, thought sharing these would help someone else, so here we go 😊.
Aug 27, 2019
6 min