mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix: handle if serverless is not set in config
This commit is contained in:
parent
374487ea29
commit
d6aea1e0df
@ -60,7 +60,7 @@ export function getoptions (nuxtOptions: NuxtOptions): SLSOptions {
|
||||
targetDir: null
|
||||
}
|
||||
|
||||
let target = process.env.NUXT_SLS_TARGET || nuxtOptions.serverless.target || detectTarget()
|
||||
let target = process.env.NUXT_SLS_TARGET || nuxtOptions.serverless?.target || detectTarget()
|
||||
if (typeof target === 'function') {
|
||||
target = target(nuxtOptions)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user