diff --git a/packages/nitro/src/config.ts b/packages/nitro/src/config.ts index a3163547be..dd7143eb5b 100644 --- a/packages/nitro/src/config.ts +++ b/packages/nitro/src/config.ts @@ -52,6 +52,10 @@ export function getoptions (nuxtOptions: NuxtOptions): SLSOptions { inlineChunks: true } + if (Array.isArray(nuxtOptions.generate.routes)) { + defaults.static = nuxtOptions.generate.routes + } + let target = process.env.NUXT_SLS_TARGET || nuxtOptions.serverless.target || 'node' if (typeof target === 'function') { target = target(nuxtOptions) diff --git a/packages/nitro/src/index.ts b/packages/nitro/src/index.ts index 8219c15c62..108cf714e5 100644 --- a/packages/nitro/src/index.ts +++ b/packages/nitro/src/index.ts @@ -18,6 +18,8 @@ export default function slsModule () { nuxt.options.build.standalone = true + nuxt.options.generate.crawler = false + nuxt.hook('generate:cache:ignore', (ignore) => { ignore.push(options.slsDir) })