I am wondering, if it is possible to import components from a "customer" folder and if it doesn´t exist there, to import it from a "core" folder. Something like this:
import React, {lazy} from 'react'
const MyComponent = lazy('customerFolder/myComponent').then(
if (!MyComponent) lazy('coreFolder/myComponent')
)
I know, that this code doesn´t work, but I hope you get the point. :) How can I achieve this? Maybe it is a webpack config?
I am using react 16.13 with webpack 4.43.
Thanks in advance.