Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Commit 5416867

Browse files
committed
fixes
1 parent 52aaaae commit 5416867

File tree

1 file changed

+5
-0
lines changed
  • packages/serverless-components/nextjs-component/src

1 file changed

+5
-0
lines changed

packages/serverless-components/nextjs-component/src/component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,12 +457,17 @@ class NextjsComponent extends Component {
457457
}
458458
};
459459

460+
const buildOptions = (inputs.build ?? {}) as BuildOptions;
461+
const hasSeparateApiLambdaOption = buildOptions.separateApiLambda ?? true;
462+
460463
const hasSeparateAPIPages =
464+
hasSeparateApiLambdaOption &&
461465
separateApiBuildManifest &&
462466
(Object.keys(separateApiBuildManifest.apis.nonDynamic).length > 0 ||
463467
Object.keys(separateApiBuildManifest.apis.dynamic).length > 0);
464468

465469
const hasConsolidatedApiPages =
470+
!hasSeparateApiLambdaOption &&
466471
defaultApiBuildManifest &&
467472
(Object.keys(defaultApiBuildManifest.apis.nonDynamic).length > 0 ||
468473
Object.keys(defaultApiBuildManifest.apis.dynamic).length > 0);

0 commit comments

Comments
 (0)