fix(js): remove check for non-buildable libs being used when packaging. (#11835)

- unblocks custom server in next.js
- builds are guaranteed to happen if nx.json is configured correctly
- if a package isn't buildable it will be included in the package in the
  near-future
This commit is contained in:
Jack Hsu 2022-09-01 18:07:24 -04:00 committed by GitHub
parent 46be7fc67b
commit cd3352aaa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,26 +14,15 @@ export function checkDependencies(
target: ProjectGraphProjectNode<any>;
dependencies: DependentBuildableProjectNode[];
} {
const { target, dependencies, nonBuildableDependencies } =
calculateProjectDependencies(
context.projectGraph,
context.root,
context.projectName,
context.targetName,
context.configurationName
);
const { target, dependencies } = calculateProjectDependencies(
context.projectGraph,
context.root,
context.projectName,
context.targetName,
context.configurationName
);
const projectRoot = target.data.root;
if (nonBuildableDependencies.length > 0) {
throw new Error(
`Buildable libraries can only depend on other buildable libraries. You must define the ${
context.targetName
} target for the following libraries: ${nonBuildableDependencies
.map((t) => `"${t}"`)
.join(', ')}`
);
}
if (dependencies.length > 0) {
return {
tmpTsConfig: createTmpTsConfig(