I have a directory with multiple react components. How can I import all components in a single line (from directory) without exporting components in separate index.js
src/
components/
comp1.js
comp2.js
comp3.js
comp4.js
Requirement:
import {comp1, comp2, comp3, comp4} from 'src/components';
Are there any webpack/babel plugins to achieve this? Or something else? Thanks!