@@ -9,11 +9,7 @@ import { isTest, isDebug, nodeMajorVersion, provider } from "std-env";
9
9
import { findWorkspaceDir } from "pkg-types" ;
10
10
import consola from "consola" ;
11
11
import { version } from "../package.json" ;
12
- import {
13
- resolvePath ,
14
- resolveFile ,
15
- provideFallbackValues ,
16
- } from "./utils" ;
12
+ import { resolvePath , resolveFile , provideFallbackValues } from "./utils" ;
17
13
import type {
18
14
NitroConfig ,
19
15
NitroOptions ,
@@ -162,7 +158,8 @@ export async function loadOptions(
162
158
globalThis . defineNitroConfig = globalThis . defineNitroConfig || ( ( c ) => c ) ;
163
159
164
160
// Compatibility date
165
- const compatibilityDate = process . env . NITRO_COMPATIBILITY_DATE || opts . compatibilityDate ;
161
+ const compatibilityDate =
162
+ process . env . NITRO_COMPATIBILITY_DATE || opts . compatibilityDate ;
166
163
167
164
// Preset resolver
168
165
const { resolvePreset } = await import ( "nitropack/presets" ) ;
@@ -179,10 +176,12 @@ export async function loadOptions(
179
176
preset : presetOverride ,
180
177
} ,
181
178
defaultConfig : {
182
- preset : ( await resolvePreset ( "" , {
183
- static : configOverrides . static ,
184
- compatibilityDate
185
- } ) ) ?. _meta ?. name
179
+ preset : (
180
+ await resolvePreset ( "" , {
181
+ static : configOverrides . static ,
182
+ compatibilityDate,
183
+ } )
184
+ ) ?. _meta ?. name ,
186
185
} ,
187
186
defaults : NitroDefaults ,
188
187
jitiOptions : {
@@ -191,10 +190,10 @@ export async function loadOptions(
191
190
"nitropack/config" : "nitropack/config" ,
192
191
} ,
193
192
} ,
194
- async resolve ( id : string ) {
193
+ async resolve ( id : string ) {
195
194
const preset = await resolvePreset ( id , {
196
195
static : configOverrides . static ,
197
- compatibilityDate : compatibilityDate
196
+ compatibilityDate : compatibilityDate ,
198
197
} ) ;
199
198
if ( preset ) {
200
199
return {
@@ -208,7 +207,9 @@ export async function loadOptions(
208
207
options . _config = configOverrides ;
209
208
options . _c12 = c12Config ;
210
209
211
- const _presetName = ( c12Config . layers || [ ] ) . find ( ( l ) => l . config ?. _meta ?. name ) ?. config ?. _meta ?. name || presetOverride
210
+ const _presetName =
211
+ ( c12Config . layers || [ ] ) . find ( ( l ) => l . config ?. _meta ?. name ) ?. config ?. _meta
212
+ ?. name || presetOverride ;
212
213
options . preset = _presetName as PresetName ;
213
214
214
215
options . rootDir = resolve ( options . rootDir || "." ) ;
0 commit comments