Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor() {
if (process.env.NODE_ENV === 'production') {
Sentry.init({
dsn: process.env.SENTRY_DSN,
integrations: [
new Sentry.Integrations.Breadcrumbs({
console: true, // Log calls to `console.log`, `console.debug`, etc
dom: true, // Log all click and keypress events
fetch: true, // Log HTTP requests done with the Fetch API
history: true, // Log calls to `history.pushState` and friends
sentry: true, // Log whenever we send an event to the server
xhr: true, // Log HTTP requests done with the XHR API
}),
],
});
}
}
Vue.config.productionTip = false
export default new Vue({
router,
store,
i18n,
render: h => h(Faucet),
mounted() {
document.dispatchEvent(new Event('render-event'))
}
}).$mount('#app')
// todo should store key/project elsewhere (vault?)
Sentry.init({
dsn: debugMode ? null : 'https://7e893bd9be0942a0977eb2120b7722d4@sentry.io/1394913"',
integrations: [new Sentry.Integrations.Vue({
Vue,
attachProps: true
})]
})
Vue.use(VueApollo);
/* eslint-disable no-new */
new Vue({
el: "#app",
router,
apolloProvider,
components: { App },
template: ""
});
// Init Sentry
Sentry.init({
dsn: SENTRY_DSN,
integrations: [new Sentry.Integrations.Vue({ Vue })],
environment: SENTRY_ENV,
release: SENTRY_RELEASE
});
private _initSentry() {
const sentryEnv = PRODUCTION ? 'prod' : 'dev';
if (this._config && this._config.sentryDsn) {
Sentry.init({
dsn: this._config.sentryDsn,
integrations: [new Sentry.Integrations.Vue({ Vue: Vue })],
release: GIT_HASH,
environment: sentryEnv,
});
} else {
console.log('Skipping Sentry Initialization');
}
}
private _initSentry() {
const sentryEnv = PRODUCTION ? 'prod' : 'dev';
if (this._config && this._config.sentryDsn) {
Sentry.init({
dsn: this._config.sentryDsn,
integrations: [new Sentry.Integrations.Vue({ Vue: Vue })],
release: GIT_HASH,
environment: sentryEnv,
});
} else {
console.log('Skipping Sentry Initialization');
}
}
nprogress.configure({ showSpinner: false })
Vue.use(VueMq, {
breakpoints: {
tablet: 769,
desktop: 1024,
widescreen: 1216,
fullhd: Infinity
}
})
Vue.use(VueSocketio, io(process.env.VUE_APP_API_URL), store)
if (process.env.VUE_APP_SENTRY_DSN) {
Sentry.init({
dsn: process.env.VUE_APP_SENTRY_DSN,
integrations: [new Sentry.Integrations.Vue({ Vue })]
})
}
new Vue({
router,
store,
i18n,
render: h => h(App)
}).$mount('#app')