-
-
Notifications
You must be signed in to change notification settings - Fork 1
Feat/cf worker build #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR integrates Cloudflare Worker support into the frontend pipeline by adding Wrangler-based build, preview, and deploy scripts, installing the Wrangler dependency, and introducing a dedicated configuration file. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes - here's some feedback:
- I don’t see any worker entrypoint source file added—please include your worker script (e.g.
index.ts
/worker.ts
) and reference it in wrangler.toml sowrangler dev
/deploy
can pick it up. - Consider moving
wrangler
from dependencies to devDependencies since it’s only needed for build/deploy and shouldn’t ship in production packages.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- I don’t see any worker entrypoint source file added—please include your worker script (e.g. `index.ts`/`worker.ts`) and reference it in wrangler.toml so `wrangler dev`/`deploy` can pick it up.
- Consider moving `wrangler` from dependencies to devDependencies since it’s only needed for build/deploy and shouldn’t ship in production packages.
## Individual Comments
### Comment 1
<location> `wrangler.toml:7` </location>
<code_context>
+
+[observability]
+enabled = true
+head_sampling_rate = 1
\ No newline at end of file
</code_context>
<issue_to_address>
**suggestion (performance):** Review the observability head_sampling_rate setting for production use.
Setting head_sampling_rate to 1 will sample all traces, which can impact performance and cost in production. Adjust this value for production if full sampling is not required.
</issue_to_address>
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This pull request adds support for deploying and previewing a Cloudflare Worker for the frontend project. The most important changes include new scripts for worker deployment, the addition of the
wrangler
dependency, and the creation of awrangler.toml
configuration file.Cloudflare Worker integration:
preview:worker
anddeploy:worker
scripts topackage.json
for building and running/deploying the worker using Wrangler.wrangler
as a project dependency inpackage.json
to enable Cloudflare Worker development and deployment.wrangler.toml
with configuration for the worker, including asset directory, compatibility date, and observability settings.Summary by Sourcery
Add Cloudflare Worker support for the frontend by introducing Wrangler scripts and configuration.
New Features:
preview:worker
anddeploy:worker
scripts to package.json for building and running/deploying the Cloudflare Workerwrangler
as a project dependency to enable Cloudflare Worker development and deploymentwrangler.toml
configuration file with asset directory, compatibility date, and observability settings