MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / setup

Function setup

packages/vue/src/integration.ts:28–46  ·  view source on GitHub ↗
(client)

Source from the content-addressed store, hash-verified

26 return {
27 name: INTEGRATION_NAME,
28 setup(client) {
29 const options: Options = { ...DEFAULT_CONFIG, ...client.getOptions(), ...integrationOptions };
30 if (!options.Vue && !options.app) {
31 consoleSandbox(() => {
32 // eslint-disable-next-line no-console
33 console.warn(
34 '[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured. Update your `Sentry.init` call with an appropriate config option: `app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).',
35 );
36 });
37 return;
38 }
39
40 if (options.app) {
41 const apps = Array.isArray(options.app) ? options.app : [options.app];
42 apps.forEach(app => vueInit(app, options));
43 } else if (options.Vue) {
44 vueInit(options.Vue, options);
45 }
46 },
47 };
48});
49

Callers

nothing calls this directly

Calls 5

consoleSandboxFunction · 0.90
vueInitFunction · 0.85
getOptionsMethod · 0.65
warnMethod · 0.65
forEachMethod · 0.65

Tested by

no test coverage detected