Skip to content

Commit 1c77e2a

Browse files
committed
feat: Use regex to filter .vue files
1 parent 96a7d18 commit 1c77e2a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ export interface VuePluginOptions {
2424
* Include files or directories.
2525
* @default `'.vue'`
2626
*/
27-
include?: string
27+
include?: Array<string|RegExp> | string | RegExp
2828
/**
2929
* Exclude files or directories.
3030
* @default `undefined`
3131
*/
32-
exclude?: string
32+
exclude?: Array<string|RegExp> | string | RegExp
3333
/**
3434
* Default language for blocks.
3535
*

src/utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ export interface VuePartRequestCreator {
3030
}
3131

3232
export function createVueFilter(
33-
include: string | string[] = ['*.vue', '**/*.vue'],
34-
exclude: string | string[] = []
33+
include: Array<string|RegExp> | string | RegExp = [/\.vue$/i],
34+
exclude: Array<string|RegExp> | string | RegExp = []
3535
): (file: string) => boolean {
3636
const filter = createFilter(include, exclude)
3737

0 commit comments

Comments
 (0)