I’m trying to get started with plugin (panel) development, and I feel I’ve hit a bit of an immediate stumbling block.
When I look at one of the native panels, such as singlestat, I see that it’s written in TypeScript, and I don’t find any evidence that it ever gets compiled/transpiled to ES6 or anything else before it made available on the server. Is that native TS support a special privilege given to the panels that ship with Grafana? It seems like anything I try to do to recreate that yields busted panels.
Copying singlestat entirely (in the public/app dir), and only changing the ID in plugin.json breaks the panel. Copying singlestat to the conf plugin directory also gives a broken panel. Changing the id of the existing singlestat plugin (without making a copy) breaks the panel. Even just moving the singlestat plugin from public/app to the conf plugin dir breaks it.
Why is it that these plugins function only under very specific circumstances? Sorry if this is a totally obvious answer, but I can’t find anything in the docs that talks about TypeScript sometimes being supported, or an intrinsic link between the plugin ID and other parts of the code (classes, icons, etc). I just can’t figure out why changing one character of the plugin’s id would cause it to break.
I appreciate any help!