File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
packages/open-next/src/build Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @opennextjs/aws " : patch
3+ ---
4+
5+ feat(middleware): add ability to force single build pass
Original file line number Diff line number Diff line change @@ -14,8 +14,12 @@ import { installDependencies } from "./installDeps.js";
1414 * Compiles the middleware bundle.
1515 *
1616 * @param options Build Options.
17+ * @param forceOnlyBuildOnce force to build only once.
1718 */
18- export async function createMiddleware ( options : buildHelper . BuildOptions ) {
19+ export async function createMiddleware (
20+ options : buildHelper . BuildOptions ,
21+ { forceOnlyBuildOnce = false } = { } ,
22+ ) {
1923 logger . info ( `Bundling middleware function...` ) ;
2024
2125 const { appBuildOutputPath, config, outputDir } = options ;
@@ -57,6 +61,7 @@ export async function createMiddleware(options: buildHelper.BuildOptions) {
5761 defaultConverter : "aws-cloudfront" ,
5862 includeCache : config . dangerous ?. enableCacheInterception ,
5963 additionalExternals : config . edgeExternals ,
64+ onlyBuildOnce : forceOnlyBuildOnce === true ,
6065 } ) ;
6166
6267 installDependencies ( outputPath , config . middleware ?. install ) ;
You can’t perform that action at this time.
0 commit comments