I am trying to dynamically load a module depending on the sub-class' class name. The code could be seen here:
const name = this.constructor.name;
import(
`../../src/components/${name}/View/${name}.js`).then((module) => {
});
I am using a mixin with is extended by a sub-class. The mixin resides in node_modules.
Assuming the sub-class resides in ./src/components/ExampleComponent
Is there any way to infer the sub-class' directory from the mixin?
Is there anyway to infer the project root?
Using webpack, webpack is unable to find the template ExampleComponent/View/ExampleComponent
unless the mixin resides inside of the project root.
Thanks for your help.