Hi,
I'm running Grafana 7.4.2 locally.
I've built a data source plugin using grafana-starter-datasource. I pointed Grafana to its dist folder.
Grafana's defaults.ini:
# Directory where grafana will automatically scan and look for plugins
plugins = C:\src\grafana-starter-datasource\dist
When I run yarn watch, everything works fine.
However, when I run yarn build (in order to build a plugin to install to remote Grafana server), my data source stops working:
FooBar Datasource plugin failed
Error: [$injector:unpr] Unknown provider: tProvider <- t http://errors.angularjs.org/1.6.9/$injector/unpr?p0=tProvider%20%3C-%20t

This seems to be because of minification.
Unminified (208 KB), result of yarn watch - works:

Minified (39 KB), result of yarn build - doesn't work:

I noticed this happening only recently.
My dependencies (package.json):
{
"name": "simple-datasource",
"version": "1.0.0",
"description": "Grafana Data Source Plugin Template",
"scripts": {
"build": "grafana-toolkit plugin:build",
"test": "grafana-toolkit plugin:test",
"dev": "grafana-toolkit plugin:dev",
"watch": "grafana-toolkit plugin:dev --watch",
"sign": "grafana-toolkit plugin:sign"
},
"author": "Grafana Labs",
"license": "Apache-2.0",
"devDependencies": {
"@grafana/data": "7.4.2",
"@grafana/runtime": "7.4.2",
"@grafana/toolkit": "7.4.2",
"@grafana/ui": "7.4.2",
"@testing-library/jest-dom": "5.4.0",
"@testing-library/react": "^10.0.2",
"@types/lodash": "latest",
},
"dependencies": {
"grafana": "^1.0.1"
}
"engines": {
"node": ">=14"
}
}
Hi,
I'm running Grafana 7.4.2 locally.
I've built a data source plugin using grafana-starter-datasource. I pointed Grafana to its
distfolder.Grafana's defaults.ini:
When I run
yarn watch, everything works fine.However, when I run
yarn build(in order to build a plugin to install to remote Grafana server), my data source stops working:This seems to be because of minification.
Unminified (208 KB), result of
yarn watch- works:Minified (39 KB), result of
yarn build- doesn't work:I noticed this happening only recently.
My dependencies (
package.json):