Skip to content

Commit fd6960f

Browse files
authored
(perf) fix glob to omit dotted folders
1 parent 84c7463 commit fd6960f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/language-server/src/lib/documents/configLoader.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ export class ConfigLoader {
8383
try {
8484
const pathResults = this.globSync('**/svelte.config.{js,cjs,mjs}', {
8585
cwd: directory,
86-
ignore: ['**/node_modules/**']
86+
// the second pattern is necessary because else fast-glob treats .tmp/../node_modules/.. as a valid match for some reason
87+
ignore: ['**/node_modules/**', '**/.*/**'],
88+
onlyFiles: true
8789
});
8890
const someConfigIsImmediateFileInDirectory =
8991
pathResults.length > 0 && pathResults.some((res) => !this.path.dirname(res));

0 commit comments

Comments
 (0)