I have a common exported property, route, in all my imported modules that I would like to access dynamically, but can't work out how to iterate over the list of imported modules. Can this be done?
import User from '/components/user.js';
import Document from '/components/document.js';
var routes = [];
[array of imported modules].forEach(m => routes.push(m.route));
UPDATE:
So far I've tried the following and can't find the module list on any of them
console.log(User.constructor);
console.log(Reflect.ownKeys(this));
console.log(Reflect.ownKeys(User));
Where should I be looking?