This PR adds a simple webpack plugin the inserts a buildMode prop to the plugin.json asset. Knowing if the plugin was build for dev or production might be useful in a different scenarios. For example, in the plugin extensions API we put error messages in the dev console in case Grafana is in dev mode. However, most Grafana contributors would consider these errors spam. It would be better if we could only log errors related to a certain plugin in case that specific plugin was built for development.
Should buildMode be added to the plugin.json schema? Note that this is only added to the asset build time.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
📦 Published PR as canary version: Canary Versions
:sparkles: Test out this PR locally via:
```bash
npm install @grafana/create-plugin@5.8.0-canary.1281.9616e88.0
# or
yarn add @grafana/create-plugin@5.8.0-canary.1281.9616e88.0
```
Hello! 👋 This repository uses Auto for releasing packages using PR labels.
✨ This PR can be merged and will trigger a new minor release.
NOTE: When merging a PR with the release label please avoid merging another PR. For further information see here.
What this PR does / why we need it:
This PR adds a simple webpack plugin the inserts a
buildMode
prop to the plugin.json asset. Knowing if the plugin was build for dev or production might be useful in a different scenarios. For example, in the plugin extensions API we put error messages in the dev console in case Grafana is in dev mode. However, most Grafana contributors would consider these errors spam. It would be better if we could only log errors related to a certain plugin in case that specific plugin was built for development.Should
buildMode
be added to the plugin.json schema? Note that this is only added to the asset build time.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
📦 Published PR as canary version:
Canary Versions
:sparkles: Test out this PR locally via: ```bash npm install @grafana/create-plugin@5.8.0-canary.1281.9616e88.0 # or yarn add @grafana/create-plugin@5.8.0-canary.1281.9616e88.0 ```