Skip to content

Commit

Permalink
fix(core): globbing for project.json and package.json does not ignore…
Browse files Browse the repository at this point in the history
… dist correctly
  • Loading branch information
vsavkin committed Oct 24, 2022
1 parent b403017 commit 2ed5d57
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/nx/src/config/workspaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,8 @@ export function globForProjectFiles(

const globsToExclude = globPatternsFromPackageManagerWorkspaces
.filter((glob) => glob.startsWith('!'))
.map((glob) => glob.substring(1));
.map((glob) => glob.substring(1))
.map((glob) => (glob.startsWith('/') ? glob.substring(1) : glob));

const projectGlobPatterns: string[] = [
'project.json',
Expand All @@ -675,9 +676,9 @@ export function globForProjectFiles(
*/

const ALWAYS_IGNORE = [
'/node_modules',
'node_modules',
'**/node_modules',
'/dist',
'dist',
...globsToExclude,
];

Expand Down

0 comments on commit 2ed5d57

Please sign in to comment.