wrangler.jsonc alternate "main" entrypoint in Vite Project
Hi, in a Vite React project deployed to Cloudflare Workers, created using
pnpm create cloudflare@latest
, I'm just curious if it's possible to set the "main" value in a project's wrangler.jsonc file to something other than the default "worker/index.ts" entrypoint. For example, if I want to setup a Hono API, can I change the entrypoint to "src/server/index.ts"? Logically, that feels doable, but is there anything else I need to do to keep Typescript happy and make sure my types generated by worker types
are still reachable? Any help in setting up a Vite React project with a Hono API deployed to Cloudflare Workers would be helpful, thank you.0 Replies