feat(vue): export vueInit func#5757
Conversation
recover spacing
|
As to why we need export |
vueInit func
|
I think this is a very reasonable request! Could you also update the docs to add this info? https://docs.sentry.io/platforms/javascript/guides/vue/ |
|
I can't found the repo of docs for @sentry/vue. So I just write here. @AbhiPrasad Vue 2/3 - Multiple Apps Initial Indepentently import { createApp } from "vue3";
import Vue from "vue2";
import * as Sentry from "@sentry/vue";
const appOne = createApp({
// ...
});
Sentry.init({
app: appOne
});
// Vue2 initialization before loaded asynchronously as a subapp
setTimout(() => {
const appTwo = new Vue({
// ...
})
Sentry.vueInit(Vue)
}, 0)
// Vue3 initialization before loaded asynchronously as a subapp
setTimout(() => {
const appThree = createApp({
// ...
});
Sentry.vueInit(appThree)
}, 1000) |
There was a problem hiding this comment.
Talked about this as a team and decided we aren't going to proceed with this change, since you can just call attachErrorHandler and createTracingMixins by yourself if you need it, vueInit is just sugar over those functions.
We want to control the public API exposed to users - because it helps make future changes much easier (less breaking changes needed).
Thank you for opening a PR! Hopefully you can just vendor what you need here.
Before submitting a pull request, please take a look at our
Contributing guidelines and verify:
yarn lint) & (yarn test).support export
vueInit