Building Dash component: compatibility with dynamic import/conditional loading?

Hi,
I recently tried to build a simple Dash component that implements the leaflet-compare plugin. Because this plugin is quite outdated, its leaflet version doesn’t match the existing Dash-Leaflet’s component one, and it cannot be changed. As such, importing this newly built leaflet-compare Dash component would generate error (e.g. L.Control.Draw, or p.Edit.Poly errors) if I use it in my app, combined with the Dash-Leaflet component.

To cope with this problem, I had in mind to use dynamic imports when creating the React component. But converting this component to a Dash one doesn’t seem to work as the imported materials are not generated. Is there a way to may Dash component building compatible with dynamic import or conditional loading?

Thank you.