I’m looking for a way to initialise Sentry before Vue is loaded, but still have access to the Vue integration when it’s usable.
At the moment I seem to have the choice of initialising Sentry in index.html, without the integration (as Vue is not available).
<script src="https://browser.sentry-cdn.com/4.2.3/bundle.min.js"crossorigin="anonymous"></script>`
<script type="text/javascript">
Sentry.init({
dsn: 'https://f7d01a52e1b04292834f1daa40ae2ad9@sentry.io/300342'
});
</script>
or initialising it in main.js, skipping out every error that may occur before this point.
import * as Sentry from '@sentry/browser';
Sentry.init({
dsn: 'https://f7d01a52e1b04292834f1daa40ae2ad9@sentry.io/300342',
integrations: [new Sentry.Integrations.Vue({ Vue })]
});
I would like to know if there is anyway I can initialise Sentry as early as possible and then add the Vue integration as it becomes available. Failing that rounding up all exceptions that happen to occur before Sentry is initialised.