Skip to content

Commit 6315d95

Browse files
committed
rename
1 parent c3c457d commit 6315d95

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/open-next/src/build/constant.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
export const MIDDLEWARE_TRACE_FILE = "server/middleware.js.nft.json";
33
export const INSTRUMENTATION_TRACE_FILE = "server/instrumentation.js.nft.json";
44

5-
export const DEV_CONFIG_PATH = "./open-next.config.local.ts";
5+
export const LOCAL_CONFIG_PATH = "./open-next.config.local.ts";
66
// This is an OpenNext config to run the default server function locally
77
// https://opennext.js.org/aws/contribute/local_run
88
export const LOCAL_CONFIG = `export default {

packages/open-next/src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { spawnSync } from "node:child_process";
44
import { existsSync, writeFileSync } from "node:fs";
55
import path from "node:path";
66
import { build } from "./build.js";
7-
import { DEV_CONFIG_PATH, LOCAL_CONFIG } from "./build/constant.js";
7+
import { LOCAL_CONFIG_PATH, LOCAL_CONFIG } from "./build/constant.js";
88
import { printHeader } from "./build/utils.js";
99

1010
const command = process.argv[2];
@@ -46,7 +46,7 @@ function parseArgs() {
4646
}
4747

4848
async function buildLocalConfig() {
49-
if (!existsSync(DEV_CONFIG_PATH)) {
49+
if (!existsSync(LOCAL_CONFIG_PATH)) {
5050
console.error(
5151
"open-next.config.local.ts does not exist. You can run `local:config` first to generate it.",
5252
);
@@ -55,7 +55,7 @@ async function buildLocalConfig() {
5555

5656
// Build OpenNext with dev overrides
5757
printHeader("Building OpenNext with open-next.config.local.ts");
58-
await build(DEV_CONFIG_PATH, args["--node-externals"]);
58+
await build(LOCAL_CONFIG_PATH, args["--node-externals"]);
5959
}
6060

6161
function runLocally() {
@@ -79,15 +79,15 @@ function runLocally() {
7979
}
8080

8181
function writeLocalConfig() {
82-
if (existsSync(DEV_CONFIG_PATH)) {
82+
if (existsSync(LOCAL_CONFIG_PATH)) {
8383
console.error(
8484
"open-next.config.local.ts already exists. Please remove it before running this command.",
8585
);
8686
process.exit(1);
8787
}
8888

8989
try {
90-
writeFileSync(DEV_CONFIG_PATH, LOCAL_CONFIG);
90+
writeFileSync(LOCAL_CONFIG_PATH, LOCAL_CONFIG);
9191
} catch (e) {
9292
console.error("Error writing open-next.config.local.ts", e);
9393
}

0 commit comments

Comments
 (0)