Reactjs unknowns

Bit of a stab in the dark here but, is there a way that say i am making a project to sell where if you want only set things you drop them into a modules folder then my react project scans that folder and automatically detects the modules then creates the routes for them and will work with them without ever having to reference the modules directly my doing import addon1 from ‘./modules/addon1’ or is that too much not react.

not looking for exact answers just something to look into for a project ive been asked to do would love to write it in react but im afraid its not possible.

tl:dr React auto detect modules without me writing imports, and use them to build the routes and app itself.