How to import UMD module with dependency within a plugin?

I have 2 UMD modules. Module B depends on module A. I am using the transform-es2015-modules-systemjs babel transform.

The code below fails:

import stuff from A;
import stuff from B;

How do I import both UMD modules within a Grafana plugin?