feat(angular): disable debug in production for angular compiler

This commit is contained in:
Torkel Ödegaard 2016-05-17 15:00:48 +02:00
parent efe6fd154b
commit 83f5080274
2 changed files with 4 additions and 1 deletions

View File

@ -142,6 +142,7 @@ func getFrontendSettingsMap(c *middleware.Context) (map[string]interface{}, erro
"buildstamp": setting.BuildStamp,
"latestVersion": plugins.GrafanaLatestVersion,
"hasUpdate": plugins.GrafanaHasUpdate,
"env": setting.Env,
},
}

View File

@ -42,7 +42,9 @@ export class GrafanaApp {
app.constant('grafanaVersion', "@grafanaVersion@");
app.config(($locationProvider, $controllerProvider, $compileProvider, $filterProvider, $provide) => {
//$compileProvider.debugInfoEnabled(false);
if (config.buildInfo.env !== 'development') {
$compileProvider.debugInfoEnabled(false);
}
this.registerFunctions.controller = $controllerProvider.register;
this.registerFunctions.directive = $compileProvider.directive;