Consider the following example:
import ThingA from './ThingA';
import ThingB from './ThingB';
// ... import more things
const things = {
ThingA,
ThingB,
// ... add more things to object
};
This code works fine, but each item being imported needs to be specified twice (once to import, once to add it to the object). Is there a way to remove this duplication?
I've taken a look at the import docs, but the syntax doesn't seem to support anything for this use case.