Skip to content

Commit 6ac6bf5

Browse files
committed
fix: cjs import issue on utils
1 parent 2642800 commit 6ac6bf5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { resolve, win32 } from 'node:path'
44
import { URLSearchParams } from 'node:url'
55
import { slash } from '@antfu/utils'
66
import Debug from 'debug'
7-
import { isMatch } from 'micromatch'
7+
import micromatch from 'micromatch'
88

99
import { cacheAllRouteRE, countSlashRE, dynamicRouteRE, MODULE_ID_VIRTUAL, nuxtCacheAllRouteRE, nuxtDynamicRouteRE, replaceDynamicRouteRE, replaceIndexRE } from './constants'
1010

@@ -37,7 +37,7 @@ function isPagesDir(path: string, options: ResolvedOptions) {
3737
}
3838

3939
export function isTarget(path: string, options: ResolvedOptions) {
40-
return isPagesDir(path, options) && !isMatch(path, options.exclude) && options.extensionsRE.test(path)
40+
return isPagesDir(path, options) && !micromatch.isMatch(path, options.exclude) && options.extensionsRE.test(path)
4141
}
4242

4343
export function isDynamicRoute(routePath: string, nuxtStyle = false) {

0 commit comments

Comments
 (0)