Vendor 3rd party lib in React based plugin (Druid SQL)


We have a community driven Druid plugin (signed by Grafana) available here ( I have been meaning to work on a feature for sometime but have hit wall with everything I have tried.

Specifically, I have been trying to improve the usability of Druid SQL in the plugin. The results we get back from Druid are just rows and rows of data and to make sense of these results and form them into DataFrames we need to parse user’s SQL query. This is very similar to what the internal postgres plugin does. For this purpose, I am trying to use a Druid SQL parser (available here Since there’s no way to include external packages in a plugin, I thought maybe vendoring them in a third party folder may make it work. This is where I am not sure how to work with this.

  • Should the above library be transpiled from Typescript to JS and then to a single file and then vendored in or is there some better easier way?
  • How do I call (is it OK) javascript functions in the parser library from the plugin.
  • Is it possible to use, will that be a better approach?

Looking for some help here, any pointers will be much appreciated!


I found out that this isn’t required with the new React based plugins. You can just add any lib you need in package.json and it will work. I recall when I used this with the angular plugins, it did not work for me.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.