mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 00:23:53 +00:00
fix: extend routes from serverless.static
This commit is contained in:
parent
a4952a057c
commit
4185ec896f
@ -52,10 +52,6 @@ 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)
|
||||
|
@ -19,6 +19,12 @@ export default <Module> function slsModule () {
|
||||
nuxt.options.build.standalone = true
|
||||
|
||||
nuxt.options.generate.crawler = false
|
||||
if (Array.isArray(nuxt.options.generate.routes)) {
|
||||
nuxt.options.generate.routes = Array.from(new Set([
|
||||
...nuxt.options.generate.routes,
|
||||
...options.static
|
||||
]))
|
||||
}
|
||||
|
||||
nuxt.hook('generate:cache:ignore', (ignore) => {
|
||||
ignore.push(options.slsDir)
|
||||
|
Loading…
Reference in New Issue
Block a user