main.js 909 B

1234567891011121314151617181920212223242526272829303132
  1. import Vue from 'vue';
  2. import * as Sentry from '@sentry/browser';
  3. import { Vue as VueIntegration } from '@sentry/integrations';
  4. import App from './App.vue';
  5. import router from './router';
  6. import store from './store';
  7. // if (process.env.NODE_ENV === "production") {
  8. // Sentry.init({
  9. // dsn: "http://3a6d0bf34c8e48e79771449a1ef487db@localhost:9000/2",
  10. // integrations: [new VueIntegration({ Vue, attachProps: true })]
  11. // });
  12. // // Sentry.configureScope(function(scope) {
  13. // // scope.setUser({ email: "john.doe@example.com" });
  14. // // });
  15. // }
  16. // 在生产环境中让sentry报错
  17. process.env.NODE_ENV === 'production'
  18. && Sentry.init({
  19. dsn: 'http://3a6d0bf34c8e48e79771449a1ef487db@localhost:9000/2',
  20. integrations: [new VueIntegration({ Vue, attachProps: true })],
  21. });
  22. Vue.config.productionTip = false;
  23. new Vue({
  24. router,
  25. store,
  26. render: (h) => h(App),
  27. }).$mount('#app');