I am building a grafana plugin using TypeScript, same as here.
The folder structure looks like:
Unsurprisingly I cannot compile my TypeScript plugin because in module.ts
import { MetricsPanelCtrl } from 'app/plugins/sdk';
All the examples use the path 'app/plugins/sdk' even though app is nowhere near them in the directory structure.
So how do they do it?
I tried changing my import path to '../../../../public/app/plugins/sdk' and that gets further, but then get 1000s of erros about the other modules not compiling like:
Running "typescript:build" (typescript) task >> ../../../public/app/core/components/code_editor/code_editor.ts(30,20): error TS2307: Cannot find module 'app/core/config'. >> ../../../public/app/core/components/code_editor/code_editor.ts(31,17): error TS2307: Cannot find module 'brace'.