We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce5c7b4 commit b8b38eeCopy full SHA for b8b38ee
2 files changed
.changeset/six-days-watch.md
@@ -0,0 +1,5 @@
1
+---
2
+"@opennextjs/cloudflare": patch
3
4
+
5
+Clean output directory before `next build`
packages/cloudflare/src/cli/build/build.ts
@@ -47,6 +47,9 @@ export async function build(
47
logger.info(`@opennextjs/cloudflare version: ${cloudflare}`);
48
logger.info(`@opennextjs/aws version: ${aws}`);
49
50
+ // Clean the output directory before building the Next app.
51
+ buildHelper.initOutputDir(options);
52
53
if (projectOpts.skipNextBuild) {
54
logger.warn("Skipping Next.js build");
55
} else {
@@ -58,7 +61,6 @@ export async function build(
58
61
59
62
// Generate deployable bundle
60
63
printHeader("Generating bundle");
- buildHelper.initOutputDir(options);
64
65
compileCache(options);
66
compileEnvFiles(options);
0 commit comments