fix jiti issue

should be fixed on jiti later on to support syntax
This commit is contained in:
pooya parsa 2020-11-09 00:28:30 +01:00
parent fc0934dd0c
commit a2413dc5fd

View File

@ -78,7 +78,7 @@ export function getoptions (nuxt: SLSNuxt): SLSOptions {
generateIgnore: [] generateIgnore: []
} }
const target = process.env.NUXT_SLS_TARGET || nuxt.options.serverless?.target || detectTarget() const target = process.env.NUXT_SLS_TARGET || (nuxt.options.serverless || {}).target || detectTarget()
let targetDefaults = TARGETS[target] || tryImport(nuxt.options.rootDir, target) let targetDefaults = TARGETS[target] || tryImport(nuxt.options.rootDir, target)
if (!targetDefaults) { if (!targetDefaults) {
throw new Error('Cannot resolve target: ' + target) throw new Error('Cannot resolve target: ' + target)