So I have isolated the issue to this import:
const SelectRecipients = React.lazy(() =>
import('../components/SelectRecipients'))
I get the following error:
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
I thought maybe it was an issue with the component itself and tried making a test component as follows:
import React from 'react'
export default () => {
return(<div>Hi</div)}
and then imported it instead of SelectRecipients and still got the error