Skip to content

Commit 04c2ca6

Browse files
committed
chore: switch to tinyglobby
1 parent 19c4dfd commit 04c2ca6

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,14 @@
136136
"@vue-macros/common": "^1.16.1",
137137
"ast-walker-scope": "^0.6.2",
138138
"chokidar": "^4.0.3",
139-
"fast-glob": "^3.3.3",
140139
"json5": "^2.2.3",
141140
"local-pkg": "^1.0.0",
142141
"magic-string": "^0.30.17",
143142
"micromatch": "^4.0.8",
144143
"mlly": "^1.7.4",
145144
"pathe": "^2.0.2",
146145
"scule": "^1.3.0",
146+
"tinyglobby": "^0.2.11",
147147
"unplugin": "2.1.2",
148148
"unplugin-utils": "^0.2.3",
149149
"yaml": "^2.7.0"

pnpm-lock.yaml

+14-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/context.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { asRoutePath, ImportsMap, logTree, throttle } from './utils'
55
import { generateRouteNamedMap } from '../codegen/generateRouteMap'
66
import { MODULE_ROUTES_PATH, MODULE_VUE_ROUTER_AUTO } from './moduleConstants'
77
import { generateRouteRecord } from '../codegen/generateRouteRecords'
8-
import fg from 'fast-glob'
8+
import { glob } from 'tinyglobby'
99
import { dirname, relative, resolve } from 'pathe'
1010
import { ServerContext } from '../options'
1111
import { getRouteBlock } from './customBlock'
@@ -73,11 +73,12 @@ export function createRoutesContext(options: ResolvedOptions) {
7373
f.startsWith('**') ? f : relative(folder.src, f)
7474
)
7575

76-
return fg(folder.pattern, {
76+
return glob(folder.pattern, {
7777
cwd: folder.src,
7878
// TODO: do they return the symbolic link path or the original file?
7979
// followSymbolicLinks: false,
8080
ignore: ignorePattern,
81+
expandDirectories: false,
8182
}).then((files) =>
8283
Promise.all(
8384
files

0 commit comments

Comments
 (0)