@@ -4,7 +4,7 @@ import { spawnSync } from "node:child_process";
4
4
import { existsSync , writeFileSync } from "node:fs" ;
5
5
import path from "node:path" ;
6
6
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" ;
8
8
import { printHeader } from "./build/utils.js" ;
9
9
10
10
const command = process . argv [ 2 ] ;
@@ -46,7 +46,7 @@ function parseArgs() {
46
46
}
47
47
48
48
async function buildLocalConfig ( ) {
49
- if ( ! existsSync ( DEV_CONFIG_PATH ) ) {
49
+ if ( ! existsSync ( LOCAL_CONFIG_PATH ) ) {
50
50
console . error (
51
51
"open-next.config.local.ts does not exist. You can run `local:config` first to generate it." ,
52
52
) ;
@@ -55,7 +55,7 @@ async function buildLocalConfig() {
55
55
56
56
// Build OpenNext with dev overrides
57
57
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" ] ) ;
59
59
}
60
60
61
61
function runLocally ( ) {
@@ -79,15 +79,15 @@ function runLocally() {
79
79
}
80
80
81
81
function writeLocalConfig ( ) {
82
- if ( existsSync ( DEV_CONFIG_PATH ) ) {
82
+ if ( existsSync ( LOCAL_CONFIG_PATH ) ) {
83
83
console . error (
84
84
"open-next.config.local.ts already exists. Please remove it before running this command." ,
85
85
) ;
86
86
process . exit ( 1 ) ;
87
87
}
88
88
89
89
try {
90
- writeFileSync ( DEV_CONFIG_PATH , LOCAL_CONFIG ) ;
90
+ writeFileSync ( LOCAL_CONFIG_PATH , LOCAL_CONFIG ) ;
91
91
} catch ( e ) {
92
92
console . error ( "Error writing open-next.config.local.ts" , e ) ;
93
93
}
0 commit comments