Skip to content

Commit cfe155f

Browse files
committed
fix: always generate / route
1 parent a42c1c8 commit cfe155f

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

playground/pages/index.vue

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/module.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ export default defineNuxtModule<ModuleOptions>({
141141

142142
nuxt.hook('pages:extend', pages => {
143143
routes.length = 0
144+
routes.push(
145+
'/',
146+
...((nuxt.options.nitro.prerender?.routes || []) as string[])
147+
)
144148
function processPages(pages: NuxtPage[], currentPath = '') {
145149
for (const page of pages) {
146150
if (page.path.includes(':')) continue

0 commit comments

Comments
 (0)