2023-05-03 14:14:12 +00:00
|
|
|
import { createResolver, defineNuxtModule, useNuxt } from 'nuxt/kit'
|
|
|
|
|
|
|
|
export default defineNuxtModule({
|
|
|
|
meta: {
|
2024-04-05 18:08:32 +00:00
|
|
|
name: 'page-extend',
|
2023-05-03 14:14:12 +00:00
|
|
|
},
|
|
|
|
setup () {
|
|
|
|
const nuxt = useNuxt()
|
|
|
|
const resolver = createResolver(import.meta.url)
|
|
|
|
|
|
|
|
nuxt.hook('pages:extend', (pages) => {
|
|
|
|
pages.push({
|
|
|
|
name: 'page-extend',
|
|
|
|
path: '/page-extend',
|
2024-04-05 18:08:32 +00:00
|
|
|
file: resolver.resolve('../runtime/page.vue'),
|
2023-09-06 19:44:59 +00:00
|
|
|
}, {
|
|
|
|
path: '/big-page-1',
|
2024-04-05 18:08:32 +00:00
|
|
|
file: resolver.resolve('./pages/big-page.vue'),
|
2023-09-06 19:44:59 +00:00
|
|
|
}, {
|
|
|
|
path: '/big-page-2',
|
2024-04-05 18:08:32 +00:00
|
|
|
file: resolver.resolve('./pages/big-page.vue'),
|
2023-05-03 14:14:12 +00:00
|
|
|
})
|
|
|
|
})
|
2024-04-05 18:08:32 +00:00
|
|
|
},
|
2023-05-03 14:14:12 +00:00
|
|
|
})
|