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 }))
|
.map(dir => ({ dir }))
|
||||||
],
|
],
|
||||||
prerender: {
|
prerender: {
|
||||||
crawlLinks: nuxt.options.generate.crawler,
|
crawlLinks: nuxt.options._generate ? nuxt.options.generate.crawler : false,
|
||||||
routes: nuxt.options.generate.routes
|
routes: []
|
||||||
|
.concat(nuxt.options.generate.routes)
|
||||||
|
.concat(nuxt.options.ssr === false ? ['/', '/200', '/404'] : [])
|
||||||
},
|
},
|
||||||
externals: {
|
externals: {
|
||||||
inline: [
|
inline: [
|
||||||
@ -143,9 +145,7 @@ export async function initNitro (nuxt: Nuxt) {
|
|||||||
} else {
|
} else {
|
||||||
await prepare(nitro)
|
await prepare(nitro)
|
||||||
await copyPublicAssets(nitro)
|
await copyPublicAssets(nitro)
|
||||||
if (nuxt.options._generate || nuxt.options.target === 'static') {
|
await prerender(nitro)
|
||||||
await prerender(nitro)
|
|
||||||
}
|
|
||||||
await build(nitro)
|
await build(nitro)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { defineNuxtConfig } from 'nuxt3'
|
import { defineNuxtConfig } from 'nuxt3'
|
||||||
|
|
||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
|
ssr: false
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user