NuxtN
Nuxt14mo ago
5 replies
NightFuries

Prerendering custom routes does not work as intented..

My directory is like follows:
.
├── app
│   ├── pages
│   │   ├── $admin
│   │   │   └── index.vue
│   │   ├── $my
│   │   │   └── index.vue
│   │   └── $www
│   │       └── index.vue
│   └── router.options.ts
├── bun.lockb
├── nuxt.config.ts
├── package.json
├── public
│   └── favicon.ico
├── README.md
├── server
│   ├── middleware
│   │   └── subdomain.ts
│   └── tsconfig.json
└── tsconfig.json


And the router.options.ts has the content as shown in the screenshot. What the router options effectively does uses the subdomain retreived from the nitro middleware and only returns the routes that belong to the respective folder: admin.localhost:3000 --> $admin/index.vue, etc. It is configured such that localhost:3000/ points to $www/index.vue.

I want to pre-render all the routes in the www subdomain. I tried saying "/": { prerender: true } and "/$www/**": { prerender: true } but they both don't work. What can I do?
e7a31714-0c41-4b22-b660-ce7642b75281.png
Was this page helpful?