As far as I know, ES modules do not allow variables as module name:
const moduleName = "foo"
import something from moduleName // will not work
const something = await import(moduleName) // will not work
I'm genuinely curious about how someone would do this with ES modules: // somewhere in a function or a class method
const plugins = pluginModules.map(require)
EDIT: I was wrong, the import() function does work with variables.