React lazy import in custom plugin

I am unable to run a custom data source plugin with lazy import of some components, without lazy importing it works.

Basically I am trying to create a new data source plugin referencing existing Prometheus plugin and running into above mentioned issue.

Apart from this, am also facing an issue while building the plugin, getting below error due to monaco-promql import.

Thanks,

How are you importing the Prometheus plugin? Since it’s a core plugin, I don’t believe it’s possible to import it in your plugin. You should be able to access the data source instance through the getDataSourceSrv though.