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.


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.

Hi Marcus, Sorry for late reply.
I was not importing the plugin, rather creating a copy of it in my custom plugin :face_with_peeking_eye:
Later dropped the idea :slight_smile: