Skip to content

Commit eb67792

Browse files
committed
fixup! feedback
1 parent 910c3d6 commit eb67792

File tree

3 files changed

+2
-18
lines changed

3 files changed

+2
-18
lines changed

packages/cloudflare/src/cli/build/build.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import * as buildHelper from "@opennextjs/aws/build/helper.js";
1010
import { printHeader, showWarningOnWindows } from "@opennextjs/aws/build/utils.js";
1111
import logger from "@opennextjs/aws/logger.js";
1212

13-
import type { ProjectOptions } from "../config.js";
14-
import { containsDotNextDir } from "../config.js";
13+
import type { ProjectOptions } from "../project-options.js";
1514
import { bundleServer } from "./bundle-server.js";
1615
import { compileEnvFiles } from "./open-next/compile-env-files.js";
1716
import { copyCacheAssets } from "./open-next/copyCacheAssets.js";
@@ -68,10 +67,6 @@ export async function build(projectOpts: ProjectOptions): Promise<void> {
6867
buildNextjsApp(options);
6968
}
7069

71-
if (!containsDotNextDir(projectOpts.sourceDir)) {
72-
throw new Error(`.next folder not found in ${projectOpts.sourceDir}`);
73-
}
74-
7570
// Generate deployable bundle
7671
printHeader("Generating bundle");
7772
buildHelper.initOutputDir(options);

packages/cloudflare/src/cli/build/utils/create-config-files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { cpSync, existsSync, readFileSync, writeFileSync } from "node:fs";
22
import { join } from "node:path";
33

44
import { getPackageTemplatesDirPath } from "../../../utils/get-package-templates-dir-path.js";
5-
import type { ProjectOptions } from "../../config.js";
5+
import type { ProjectOptions } from "../../project-options.js";
66
import { askConfirmation } from "../../utils/ask-confirmation.js";
77

88
/**

packages/cloudflare/src/cli/config.ts renamed to packages/cloudflare/src/cli/project-options.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
import { statSync } from "node:fs";
2-
import { join } from "node:path";
3-
4-
export function containsDotNextDir(folder: string): boolean {
5-
try {
6-
return statSync(join(folder, ".next")).isDirectory();
7-
} catch {
8-
return false;
9-
}
10-
}
11-
121
export type ProjectOptions = {
132
// Next app root folder
143
sourceDir: string;

0 commit comments

Comments
 (0)