I'm trying to have subcommands in my program, but I want to have them in a list and import them all at once. Can I do something like this:
const subcommands = ['help', 'add', 'remove'];
for (const subcommand of subcommands) {
import {main} from './'+subcommand+'.js';
main();
}