File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,13 @@ export interface ContentOptions<T = ContentData[]> {
49
49
* bundle if imported from components or markdown files.
50
50
*/
51
51
transform ?: ( data : ContentData [ ] ) => T | Promise < T >
52
+
53
+ /**
54
+ * Options to pass to `fast-glob`.
55
+ * You'll need to manually specify `node_modules` and `dist` in
56
+ * `globOptions.ignore` if you've overridden it.
57
+ */
58
+ globOptions ?: glob . Options
52
59
}
53
60
54
61
export interface ContentData {
@@ -72,7 +79,8 @@ export function createContentLoader<T = ContentData[]>(
72
79
includeSrc,
73
80
render,
74
81
excerpt : renderExcerpt ,
75
- transform
82
+ transform,
83
+ globOptions
76
84
} : ContentOptions < T > = { }
77
85
) : {
78
86
watch : string | string [ ]
@@ -106,7 +114,8 @@ export function createContentLoader<T = ContentData[]>(
106
114
// the loader is being called directly, do a fresh glob
107
115
files = (
108
116
await glob ( pattern , {
109
- ignore : [ '**/node_modules/**' , '**/dist/**' ]
117
+ ignore : [ '**/node_modules/**' , '**/dist/**' ] ,
118
+ ...globOptions
110
119
} )
111
120
) . sort ( )
112
121
}
You can’t perform that action at this time.
0 commit comments