mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
feat: enable hybrid rendering for nuxi build
(#4373)
This commit is contained in:
parent
ea14a5c1c1
commit
83d27bd158
@ -50,8 +50,10 @@ export async function initNitro (nuxt: Nuxt) {
|
||||
.map(dir => ({ dir }))
|
||||
],
|
||||
prerender: {
|
||||
crawlLinks: nuxt.options.generate.crawler,
|
||||
routes: nuxt.options.generate.routes
|
||||
crawlLinks: nuxt.options._generate ? nuxt.options.generate.crawler : false,
|
||||
routes: []
|
||||
.concat(nuxt.options.generate.routes)
|
||||
.concat(nuxt.options.ssr === false ? ['/', '/200', '/404'] : [])
|
||||
},
|
||||
externals: {
|
||||
inline: [
|
||||
@ -143,9 +145,7 @@ export async function initNitro (nuxt: Nuxt) {
|
||||
} else {
|
||||
await prepare(nitro)
|
||||
await copyPublicAssets(nitro)
|
||||
if (nuxt.options._generate || nuxt.options.target === 'static') {
|
||||
await prerender(nitro)
|
||||
}
|
||||
await build(nitro)
|
||||
}
|
||||
})
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { defineNuxtConfig } from 'nuxt3'
|
||||
|
||||
export default defineNuxtConfig({
|
||||
ssr: false
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user