Skip to content

Commit

Permalink
fix(angular): building all projects in webpack-server nrwl#11349 (nrw…
Browse files Browse the repository at this point in the history
  • Loading branch information
Coly010 authored Aug 4, 2022
1 parent 308fd9b commit e8ad465
Showing 1 changed file with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,19 @@ export function executeWebpackServerBuilder(
const workspaceDependencies = dependencies
.filter((dep) => !isNpmProject(dep.node))
.map((dep) => dep.node.name);
baseWebpackConfig.plugins.push(
new WebpackNxBuildCoordinationPlugin(
`nx run-many --target=${
parsedBrowserTarget.target
} --projects=${workspaceDependencies.join(',')}`
)
);
// default for `nx run-many` is --all projects
// by passing an empty string for --projects, run-many will default to
// run the target for all projects.
// This will occur when workspaceDependencies = []
if (workspaceDependencies.length > 0) {
baseWebpackConfig.plugins.push(
new WebpackNxBuildCoordinationPlugin(
`nx run-many --target=${
parsedBrowserTarget.target
} --projects=${workspaceDependencies.join(',')}`
)
);
}
}

if (!pathToWebpackConfig) {
Expand Down

0 comments on commit e8ad465

Please sign in to comment.