File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,20 @@ export default defineNuxtModule<ModuleOptions>({
9999 src : moduleDirResolver . resolve ( './runtime/plugins/route-detector.server' ) ,
100100 mode : 'server' ,
101101 } ) ;
102+
103+ // Add the sentry config file to the include array
104+ nuxt . hook ( 'prepare:types' , options => {
105+ const tsConfig = options . tsConfig as { include ?: string [ ] } ;
106+
107+ if ( ! tsConfig . include ) {
108+ tsConfig . include = [ ] ;
109+ }
110+
111+ // Add type references for useRuntimeConfig in root files for nuxt v4
112+ // Should be relative to `root/.nuxt`
113+ const relativePath = path . relative ( nuxt . options . buildDir , serverConfigFile ) ;
114+ tsConfig . include . push ( relativePath ) ;
115+ } ) ;
102116 }
103117
104118 if ( clientConfigFile || serverConfigFile ) {
You can’t perform that action at this time.
0 commit comments