Hi I have a question, I'm using vite with functions, to run localy using wrangler pages dev command,
Hi I have a question, I'm using vite with functions, to run localy using wrangler pages dev command, is always run the vite build first?
child_processfunctions/_middleware.ts the build fails trying to import the package, but I'm not sure where the packages for functions are meant to be set up The docs say using wrangler.toml will likely overwrite settings that I have in the dashboard, which I'd prefer to avoid. Can I specify plugins from the dashboard? Or if not, is there a specific location where I should put package requirements for functions, rather than a general application sort of build? ThanksUncaught SyntaxError: Identifier '__cf_cjs' has already been declared has anyone seen this?import { Hono } from 'hono'
const app = new Hono()
app.get('/', (c) => c.text('Hello Cloudflare Workers!'))
export default appwrangler pages secret put


npm run start after successfully running npm run build.

/functions/[[path]].ts file wrangler pages deployment tail is probably what you're looking for
functions folder always got ignored. I tried putting it at same level as package.json, under src, under src/app, nothing worked. The build output (.vercel/output/) doesn’t contain my function. When I run the website locally and try to call my API localhost:8788/api/helloworld, I only see 404 Error. Do I need to declare anything in wrangler.toml or change my build command (currently it is like in the first guide) for my functions folder to work? Thanks in advance!

functions directory api routing.opennext-cloudflare for cloudflare workers assets and next-on-pages for cloudflare pages

import { Hono } from 'hono'
const app = new Hono()
app.get('/', (c) => c.text('Hello Cloudflare Workers!'))
export default appwrangler pages secret putnpm run start/functions/[[path]].tsimport { createRequestHandler } from "@remix-run/cloudflare-pages";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore - the server build file is generated by `remix vite:build`
// eslint-disable-next-line import/no-unresolved
import * as build from "../build/server";
export const onRequest = createRequestHandler({
//@ts-ignore
build,
});wrangler pages deployment tailfunctionsfunctionsfunctionssrc/app.vercel/output/localhost:8788/api/helloworldwrangler.tomlopennext-cloudflarenext-on-pages ✘ [ERROR] No routes found when building Functions directory: /opt/buildhome/repo/functionsRoot directory:
= dist
= functions
| - index.js
| - auth
| - login.js
| - register.js
| - resetpassword.js
= src
= _routes.json
= wrangler.toml