Skip to content

Commit

Permalink
(perf) fix glob to omit dotted folders
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm authored Jan 10, 2023
1 parent 84c7463 commit fd6960f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/language-server/src/lib/documents/configLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ export class ConfigLoader {
try {
const pathResults = this.globSync('**/svelte.config.{js,cjs,mjs}', {
cwd: directory,
ignore: ['**/node_modules/**']
// the second pattern is necessary because else fast-glob treats .tmp/../node_modules/.. as a valid match for some reason
ignore: ['**/node_modules/**', '**/.*/**'],
onlyFiles: true
});
const someConfigIsImmediateFileInDirectory =
pathResults.length > 0 && pathResults.some((res) => !this.path.dirname(res));
Expand Down

0 comments on commit fd6960f

Please sign in to comment.