Using Create-react-app, I want to lazy load some of my components, this is working fine as long as the components are in the same folder as my main component (where I define the routes) however as soon as I want to load a component from another folder like
loader: () => import("../containers/HomeAContainer")
it fails to find/import the module. (exact same module will work if I move the file!
I have made a complete example which can be seen here
- I have also tried to change the route to src/x/x instead of ../x/x but again getting errors.