fix: add generate.routes and disable crawler

This commit is contained in:
Pooya Parsa 2020-11-05 20:13:50 +01:00
parent 415db060b0
commit a4952a057c
2 changed files with 6 additions and 0 deletions

View File

@ -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)

View File

@ -18,6 +18,8 @@ export default <Module> function slsModule () {
nuxt.options.build.standalone = true
nuxt.options.generate.crawler = false
nuxt.hook('generate:cache:ignore', (ignore) => {
ignore.push(options.slsDir)
})