Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bundling): allow transitive external packages to be specified tha… #15289

Merged
merged 1 commit into from
Feb 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions packages/esbuild/src/executors/esbuild/esbuild.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,17 @@ export async function* esbuildExecutor(
const assetsResult = await copyAssets(options, context);

const externalDependencies: DependentBuildableProjectNode[] =
options.external.map((name) => {
options.external.reduce((acc, name) => {
const externalNode = context.projectGraph.externalNodes[`npm:${name}`];
if (!externalNode)
throw new Error(
`Cannot find external dependency ${name}. Check your package.json file.`
);
return {
name,
outputs: [],
node: externalNode,
};
});
if (externalNode) {
acc.push({
name,
outputs: [],
node: externalNode,
});
}
return acc;
}, []);

if (!options.thirdParty) {
const thirdPartyDependencies = getExtraDependencies(
Expand Down