Skip to content

Commit 28be74f

Browse files
committed
feat(module): replace glob with globby for page file discovery
1 parent a8e646b commit 28be74f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import type { PluginsInjections } from './runtime/plugins/01.plugin'
2828
import { LocaleManager } from './locale-manager'
2929
import { extractDefineI18nRouteData } from './utils'
3030
import { isInternalPath } from './runtime/utils/path-utils'
31-
import { glob } from 'glob'
31+
import { globby } from 'globby'
3232

3333
function generateI18nTypes() {
3434
return `
@@ -139,7 +139,7 @@ export default defineNuxtModule<ModuleOptions>({
139139
const globalLocaleRoutes: Record<string, Record<string, string>> = {}
140140

141141
// Find all page files
142-
const pageFiles = glob.sync('pages/**/*.vue', { cwd: nuxt.options.rootDir })
142+
const pageFiles = await globby('pages/**/*.vue', { cwd: nuxt.options.rootDir })
143143

144144
for (const pageFile of pageFiles) {
145145
const fullPath = join(nuxt.options.rootDir, pageFile)

0 commit comments

Comments
 (0)