From another question I got a way to dynamically scan source folders using WebPack API, and I've written some code that loads each found class using dynamic imports.
But there's nothing really dynamic here, since source files will be fixed once bundled; so the above code could then be replace with one that statically imports each discovered class.
Is there a way to generate source code during webpack execution and add it to the bundling process?
Whether possible the code should be part of the application, not a separate plugin or anything.