mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-01 18:07:22 +00:00
fix: add generate.routes and disable crawler
This commit is contained in:
parent
415db060b0
commit
a4952a057c
@ -52,6 +52,10 @@ export function getoptions (nuxtOptions: NuxtOptions): SLSOptions {
|
|||||||
inlineChunks: true
|
inlineChunks: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Array.isArray(nuxtOptions.generate.routes)) {
|
||||||
|
defaults.static = nuxtOptions.generate.routes
|
||||||
|
}
|
||||||
|
|
||||||
let target = process.env.NUXT_SLS_TARGET || nuxtOptions.serverless.target || 'node'
|
let target = process.env.NUXT_SLS_TARGET || nuxtOptions.serverless.target || 'node'
|
||||||
if (typeof target === 'function') {
|
if (typeof target === 'function') {
|
||||||
target = target(nuxtOptions)
|
target = target(nuxtOptions)
|
||||||
|
@ -18,6 +18,8 @@ export default <Module> function slsModule () {
|
|||||||
|
|
||||||
nuxt.options.build.standalone = true
|
nuxt.options.build.standalone = true
|
||||||
|
|
||||||
|
nuxt.options.generate.crawler = false
|
||||||
|
|
||||||
nuxt.hook('generate:cache:ignore', (ignore) => {
|
nuxt.hook('generate:cache:ignore', (ignore) => {
|
||||||
ignore.push(options.slsDir)
|
ignore.push(options.slsDir)
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user