Skip to content

Commit

Permalink
fix: preset not being resolved when using --target
Browse files Browse the repository at this point in the history
Fixes #345
  • Loading branch information
harlan-zw committed Aug 22, 2024
1 parent 82f687c commit 2f6bca8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util/kit.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { NuxtModule, NuxtPage } from 'nuxt/schema'
import type { Nuxt } from '@nuxt/schema'
import { addTemplate, createResolver, extendPages, loadNuxtModuleInstance, useNuxt } from '@nuxt/kit'
import { addTemplate, createResolver, extendPages, loadNuxtModuleInstance, useNuxt, tryUseNuxt } from '@nuxt/kit'
import { relative } from 'pathe'
import type { Nitro } from 'nitropack'
import { env, provider } from 'std-env'
Expand Down Expand Up @@ -104,6 +104,7 @@ export function detectTarget(options: { static?: boolean } = {}) {
}

export function resolveNitroPreset(nitroConfig?: NitroConfig): string {
nitroConfig = nitroConfig || tryUseNuxt()?.options?.nitro
if (provider === 'stackblitz')
return 'stackblitz'
let preset
Expand Down

0 comments on commit 2f6bca8

Please sign in to comment.