@@ -4,7 +4,7 @@ import { spawnSync } from "node:child_process";
44import { existsSync , writeFileSync } from "node:fs" ;
55import path from "node:path" ;
66import { 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" ;
88import { printHeader } from "./build/utils.js" ;
99
1010const command = process . argv [ 2 ] ;
@@ -46,7 +46,7 @@ function parseArgs() {
4646}
4747
4848async 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
6161function runLocally ( ) {
@@ -79,15 +79,15 @@ function runLocally() {
7979}
8080
8181function 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