Skip to content

Commit

Permalink
Add default empty glob for plugins without createNodes
Browse files Browse the repository at this point in the history
This ensures consistent indexing between glob patterns and plugins. It prevents potential errors when mapping plugins to their respective globs.
  • Loading branch information
Cammisuli committed Feb 5, 2025
1 parent 0f0e8f0 commit 0c6c222
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ export function configurationGlobs(plugins: Array<LoadedNxPlugin>): string[] {
for (const plugin of plugins) {
if ('createNodes' in plugin && plugin.createNodes) {
globPatterns.push(plugin.createNodes[0]);
} else {
// if there is no glob in the plugin, add an empty glob so that we can still map the globs by index to the plugin
globPatterns.push('')
}
}
return globPatterns;
Expand Down

0 comments on commit 0c6c222

Please sign in to comment.