Modern js library design
How to design library the most efficient way?
I have an idea about ideal lib design. But seems to be not easy to achieve it. I want to support [standard ES6 module], also other common use cases supported by [UMD]. BUT there is one more use case I want to support and so there is where the problem begins. I want to be able to switch parts of a library to different implementation.
USE CASE 1 - ES6 module
The library is provided as pure standard ES6 module, without UMD or similar bundler specific wraps.