I have a component library where I use index.ts
to import/export the components. As I build components, I have to add more imports along with more exports. The work grows by O(n)
.
Is there a way I can export all imported files? That way I would only have to do import the components, which would cut the work in half. These components will be named imports such as import { ComponentOne, ComponentTwo } from '@library'
index.ts
// Imports: Components
import ComponentOne from '../src/components/ComponentOne';
import ComponentTwo from '../src/components/ComponentTwo';
import ComponentThree from '../src/components/ComponentThree';
import ComponentFour from '../src/components/ComponentFour';
// Exports
export {
ComponentOne,
ComponentTwo,
ComponentThree,
ComponentFour,
}