My configuration as follows:
{
// ...
output: 'server',
build: {
format: 'directory',
},
adapter: cloudflare({
platformProxy: {
enabled: true,
},
}),
// ...
}
The dynamic pages wasn't found in production after deploying the built site, it only works for the prerender pages.
And I removed the _worker.js folder from dist, and create a simple _worker.js file, then re-deploy the site, and all pages works (including static pages and dynamic pages, the dynamic pages simply response the Ok).
export default {
async fetch(request, env) {
return new Response('Ok')
},
}
Any ideas? Thanks.