chore: Add error logging config on the vue package (#1670)

This commit is contained in:
Pranav Raj S
2021-02-06 12:59:19 +05:30
committed by GitHub
parent 19f7a2eda1
commit 235e4325bc
4 changed files with 76 additions and 0 deletions

View File

@@ -28,9 +28,14 @@ import {
verifyServiceWorkerExistence,
registerSubscription,
} from '../dashboard/helper/pushHelper';
import * as Sentry from '@sentry/vue';
Vue.config.env = process.env;
if (window.errorLoggingConfig) {
Sentry.init({ Vue: Vue, dsn: window.errorLoggingConfig });
}
Vue.use(VueRouter);
Vue.use(VueI18n);
Vue.use(WootUiKit);

View File

@@ -42,6 +42,7 @@
selectedLocale: '<%= I18n.locale %>'
}
window.globalConfig = <%= raw @global_config.to_json %>
window.errorLoggingConfig = '<%= ENV.fetch('SENTRY_DSN', '')%>'
</script>
<%= javascript_pack_tag 'application' %>
<%= stylesheet_pack_tag 'application' %>