Does it work when you do `next build` and `next start`?
Does it work when you do
next build and next start?next buildnext startnext dev)next build and next start, then it is a next.js problem/limitation out of our control, which is why I asked that part preview_deployment_setting in the Cloudflare Pages Terraform module? It notes all is default, and I can see based on the example custom is also allowed... are there others?preview, so I have:preview-add-text, so a little confused whypreview_deployment_setting)But it's skipping (shown in the UI) a branch named preview-add-text, so a little confused why
preview* to include "preview" and "preview-*" or just preview-* for only "preview-*pages dev with Wrangler, I can see you can pass KV/R2 etc. but what about service bindings?fetch (server-side, using SvelteKit) but naturally in production I need to use a service binding, any ideas?platform being empty locally in SvelteKit problem--kv=FOO when starting pages dev it'd be set in platform?preview_deployment_settingpreview_deployment_settingallcustompreview_deployment_setting = "custom"
preview_branch_includes = ["preview"]
preview_branch_excludes = ["master""]preview-add-textpreview*"preview-*"preview-*"preview-*platformplatform--kv=FOO// /src/hooks.server.ts
import { dev } from '$app/environment';
export const handle = ({ event, resolve }) => {
if (dev) {
// We fake the platform for local development.
event.platform ??= {
env: {
PHOTO_SERVICE: {
fetch(input, init) {
const req = new Request(input, init);
return fetch(input, req)
}
}
},
};
}
return resolve(event);
};