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(
47
47
logger . info ( `@opennextjs/cloudflare version: ${ cloudflare } ` ) ;
48
48
logger . info ( `@opennextjs/aws version: ${ aws } ` ) ;
49
49
50
+ // Clean the output directory before building the Next app.
51
+ buildHelper . initOutputDir ( options ) ;
52
+
50
53
if ( projectOpts . skipNextBuild ) {
51
54
logger . warn ( "Skipping Next.js build" ) ;
52
55
} else {
@@ -58,7 +61,6 @@ export async function build(
58
61
59
62
// Generate deployable bundle
60
63
printHeader ( "Generating bundle" ) ;
61
- buildHelper . initOutputDir ( options ) ;
62
64
63
65
compileCache ( options ) ;
64
66
compileEnvFiles ( options ) ;
You can’t perform that action at this time.
0 commit comments