Is there a way to specify the wrangler file directory?

I'm trying to deploy a static react app to cloudflare pages in a monorepo, everything works but it can't find the wrangler file because it's in a child directory, not the monorepo root.
6 Replies
Hard@Work
Hard@Work•2mo ago
You can cd into the right directory for the deploy?
yinks
yinks•2mo ago
The build script has to be at the root for turbo to build dependent packages: npx turbo run build --filter=@frontend I forgot to mention it's a turborepo monorepo
Hard@Work
Hard@Work•2mo ago
Oh, so the Worker is in the root... So why is the Wrangler config not there too?
yinks
yinks•2mo ago
the worker isn't in the root, it's in apps/frontend but since i'm using yarn workspaces, it knows the directory it is
Hard@Work
Hard@Work•2mo ago
Turbo does run in each Workspace though, right? Like if you have a build script with a wrangler deploy within apps/frontend, then Turbo would run in the apps/frontend dir, not from the root Unless something else is going on
yinks
yinks•2mo ago
oh yes it will! You fixed it for me 😭 Thank you!
Want results from more Discord servers?
Add your server