Yup, it'll be on `context.env.VARIABLE_NAME`
Yup, it'll be on
context.env.VARIABLE_NAMEplatform is always undefined in the endpoints. How can I fix this so I can access platform.env while testing locally with wrangler2?platform is always undefined: https://github.com/sveltejs/kit/tree/master/packages/adapter-cloudflare#environment-variablesnext() instead context.next() in your exampleconst file = await next() to get the response and then run an HTMLRewriter on topreturn env.ASSETS.fetch(request); (see https://developers.cloudflare.com/pages/platform/functions/#advanced-mode). So at least in advanced mode it seems you could also proxy asset requests to another local development server (ie: create-react-app dev server running on port 3000). It would be a neat idea to add to wrangler2 to provide a local dev server url where you could both be debugging pages functions and running a framework dev server locally (that will later be compiled/transpiled to a bundled/minified production build before being published to pages). This I think describes the ask for people using React/Vue/Angular/etc.
esbuild.HTMLRewriter()?Trace: Response body object should not be disturbed or lockedwrangler pages build I think? And then you have to call next() yourself and it's a mess rn)

const oldResponse = await next()
const contentType = oldResponse.headers.get('Content-Type')
if (contentType && contentType.startsWith('text/html')) {
const newResponse = handler.transform(oldResponse)
return oldResponse
}