-
Duplicates
Latest version
Current behavior 😯when i prerender Expected behavior 🤔No response Steps to reproduce 🕹import { defineConfig } from "@solidjs/start/config";
export default defineConfig({
server: {
preset: "cloudflare-pages",
prerender: { routes: ["/*404"] },
},
}); Context 🔦No response Your environment 🌎No response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
well, since solidstart uses nitro, it is a solidstart problem even if it originates from nitro |
Beta Was this translation helpful? Give feedback.
-
using the code provided with these versions
cloudflare-pagesbut you probably don't need it for this preset as workers can already serve a 404 pagecloudflare-pages-staticimport { defineConfig } from '@solidjs/start/config';
export default defineConfig({
server: {
preset: 'cloudflare-pages-static',
prerender: {
// crawlLinks: true, // required for `cloudflare-pages` preset
autoSubfolderIndex: false,
routes: ['/404'],
},
},
}); This might be what you want which also generates a redirect rule |
Beta Was this translation helpful? Give feedback.
-
I would expect you to be able to put |
Beta Was this translation helpful? Give feedback.
I would expect you to be able to put
/404
and have it work because it doesn't exist. The thing is 404 page doesn't exist so to make it exist you need to put it in the list. And it should match the star route. From there you can set up your redirect rules in your provider to point to that page.