File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
packages/cloudflare/src/cli/build Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @opennextjs/cloudflare " : patch
3+ ---
4+
5+ Clean output directory before ` next build `
Original file line number Diff line number Diff line change @@ -47,6 +47,9 @@ export async function build(
4747 logger . info ( `@opennextjs/cloudflare version: ${ cloudflare } ` ) ;
4848 logger . info ( `@opennextjs/aws version: ${ aws } ` ) ;
4949
50+ // Clean the output directory before building the Next app.
51+ buildHelper . initOutputDir ( options ) ;
52+
5053 if ( projectOpts . skipNextBuild ) {
5154 logger . warn ( "Skipping Next.js build" ) ;
5255 } else {
@@ -58,7 +61,6 @@ export async function build(
5861
5962 // Generate deployable bundle
6063 printHeader ( "Generating bundle" ) ;
61- buildHelper . initOutputDir ( options ) ;
6264
6365 compileCache ( options ) ;
6466 compileEnvFiles ( options ) ;
You can’t perform that action at this time.
0 commit comments