Based on @Gajus's answer, the following works well here
React.lazy(async () => { return { default: (await import("../main/shared/toast")).ToastContainer } })