What I had to do:
Wrap the export values ββin {}
:
export {CustomerView} from './CustomerView.jsx'
The reason I got confused:
This only works when the CustomerView
class is the default export:
import CustomerView from './CustomerView.jsx'
If the default export fails, you need to wrap it in curlies or it does not work:
import {CustomerView} from './CustomerView.jsx'
but for some reason babel-loader
will not compile this if the default class has been exported:
export CustomerView from './CustomerView.jsx'
or
import CustomerView from './CustomerView.jsx' export CustomerView
a combination of 2 compiled, but gave me the error could not find a component
(this is a preliminary rendering of response.net) if I did not set the export of the default class to CustomerView.jsx
, which, as I assumed, meant that it connects to this import /export:
import CustomerView from './CustomerView.jsx' export {CustomerView}
source share