Skip to content
Nx Cloud CI is in private beta 10.6× faster average CI time with 79% less compute. Join the beta

▸ escapeGlob(path): string

Escapes the glob syntax in a path so that, used as a task input, it matches only that path. Nx reads every fileset input as a glob, so a real path like app/(group)/page.tsx or tools/[setup].mts would otherwise match other files, or none.

Escape only the path, and append any pattern after it:

`{workspaceRoot}/${escapeGlob(setupFile)}`
`{workspaceRoot}/${escapeGlob(configDir)}/*.json`
NameTypeDescription
pathstringa workspace-relative path, using / separators

string