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";
14
14
* Compiles the middleware bundle.
15
15
*
16
16
* @param options Build Options.
17
+ * @param forceOnlyBuildOnce force to build only once.
17
18
*/
18
- export async function createMiddleware ( options : buildHelper . BuildOptions ) {
19
+ export async function createMiddleware (
20
+ options : buildHelper . BuildOptions ,
21
+ { forceOnlyBuildOnce = false } = { } ,
22
+ ) {
19
23
logger . info ( `Bundling middleware function...` ) ;
20
24
21
25
const { appBuildOutputPath, config, outputDir } = options ;
@@ -57,6 +61,7 @@ export async function createMiddleware(options: buildHelper.BuildOptions) {
57
61
defaultConverter : "aws-cloudfront" ,
58
62
includeCache : config . dangerous ?. enableCacheInterception ,
59
63
additionalExternals : config . edgeExternals ,
64
+ onlyBuildOnce : forceOnlyBuildOnce === true ,
60
65
} ) ;
61
66
62
67
installDependencies ( outputPath , config . middleware ?. install ) ;
You can’t perform that action at this time.
0 commit comments