File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { createComponentMetaCheckerByJsonConfig } from 'vue-component-meta'
11
11
import type { HookData } from './types'
12
12
13
13
export interface ModuleOptions {
14
+ silent ?: boolean
14
15
checkerOptions ?: MetaCheckerOptions
15
16
}
16
17
export interface ModuleHooks {
@@ -23,6 +24,7 @@ export default defineNuxtModule<ModuleOptions>({
23
24
configKey : 'componentMeta'
24
25
} ,
25
26
defaults : ( ) => ( {
27
+ silent : true ,
26
28
checkerOptions : {
27
29
forceUseTs : true ,
28
30
schema : { }
@@ -127,7 +129,7 @@ export default defineNuxtModule<ModuleOptions>({
127
129
// @ts -ignore
128
130
await nuxt . callHook ( 'component-meta:parsed' , data )
129
131
} catch ( error : any ) {
130
- console . error ( `Unable to parse component "${ path } ": ${ error } ` )
132
+ ! options ?. silent && console . error ( `Unable to parse component "${ path } ": ${ error } ` )
131
133
}
132
134
133
135
return data . meta
You can’t perform that action at this time.
0 commit comments