Fwiw, the past couple of weeks I've been working on supporting import assertions and CSS/JSON modules in our app at work, I thought it might be worth to share the experience and also prompted by this, maybe its helpful to someone looking into doing the same.
We currently transform our app to Systemjs. My initial thought was to start using es-module-shims, for several reasons:
- We use importmaps
- It supports CSS/JSON modules
- It would save a buildtime transformation to Systemjs
I initially thought that bundling from ESM to ESM would be at least somewhat noticeably faster than bundling from ESM to Systemjs, because of the code transform, but after running some benchmarks in our pipeline, it seemed to not make a significant difference.