File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -284,14 +284,15 @@ export default defineNuxtModule<ModuleOptions>({
284284 getContents : async ( ) => {
285285 if ( options . types ) {
286286 try {
287+ // resolvePath is used to minify user input error.
287288 const path = await resolvePath ( options . types )
288- const typesPath = await resolvePath ( '~~/.nuxt/types/' )
289+ const typesPath = await resolvePath ( '~~/.nuxt/types/' ) // this is the default path for nuxt types
289290
290291 if ( fs . existsSync ( path ) ) {
292+ // Make the path relative to the "types" directory.
291293 return `export * from '${ relative ( typesPath , path ) } '`
292294 }
293295 else {
294- // Add warning if configured but not found
295296 logger . warn (
296297 `Database types configured at "${ options . types } " but file not found. `
297298 + `Using "Database = unknown".` ,
You can’t perform that action at this time.
0 commit comments