File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ export default defineNuxtModule<ModuleOptions>({
42
42
addPluginTemplate ( {
43
43
mode : 'client' ,
44
44
filename : 'sentry-client-config.mjs' ,
45
+ order : - 20 ,
45
46
46
47
// Dynamic import of config file to wrap it within a Nuxt context (here: defineNuxtPlugin)
47
48
// Makes it possible to call useRuntimeConfig() in the user-defined sentry config file
@@ -56,7 +57,13 @@ export default defineNuxtModule<ModuleOptions>({
56
57
});` ,
57
58
} ) ;
58
59
59
- addPlugin ( { src : moduleDirResolver . resolve ( './runtime/plugins/sentry.client' ) , mode : 'client' } ) ;
60
+ // Add the plugin which loads client integrations etc. -
61
+ // this must run after the sentry-client-config plugin has run, and the client is initialized!
62
+ addPlugin ( {
63
+ src : moduleDirResolver . resolve ( './runtime/plugins/sentry.client' ) ,
64
+ mode : 'client' ,
65
+ order : - 10 ,
66
+ } ) ;
60
67
}
61
68
62
69
const serverConfigFile = findDefaultSdkInitFile ( 'server' , nuxt ) ;
You can’t perform that action at this time.
0 commit comments