Skip to content
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

Fix: Avoid unnecessary rebuilding pages functions in wrangler pages dev #3311

Merged
merged 1 commit into from
Jun 5, 2023

Conversation

Maximo-Guk
Copy link
Member

@Maximo-Guk Maximo-Guk commented May 22, 2023

Fixes #3258.

Avoid unnecessary rebuilding pages functions in wrangler pages dev

This was happening as we were using esbuild's watching mechanism + our own custom watcher which was causing high cpu usage and duplicate rebuilds on any file changes.

We have our own custom watcher setup in dev mode so that we can watch for new files that are added, as esbuild's watcher doesn't catch this

Author has included the following, where applicable:

Reviewer is to perform the following, as applicable:

  • Checked for inclusion of relevant tests
  • Checked for inclusion of a relevant changeset
  • Checked for creation of associated docs updates
  • Manually pulled down the changes and spot-tested

@Maximo-Guk Maximo-Guk requested a review from a team as a code owner May 22, 2023 14:43
@changeset-bot
Copy link

changeset-bot bot commented May 22, 2023

🦋 Changeset detected

Latest commit: f4052fc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wrangler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5047188012/npm-package-wrangler-3311

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/3311/npm-package-wrangler-3311

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5047188012/npm-package-wrangler-3311 dev path/to/script.js
Additional artifacts:
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5047188012/npm-package-cloudflare-pages-shared-3311

Note that these links will no longer work once the GitHub Actions artifact expires.

@codecov
Copy link

codecov bot commented May 22, 2023

Codecov Report

Merging #3311 (f4052fc) into main (99e6ccf) will increase coverage by 0.09%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3311      +/-   ##
==========================================
+ Coverage   75.44%   75.54%   +0.09%     
==========================================
  Files         180      180              
  Lines       11003    10982      -21     
  Branches     2887     2885       -2     
==========================================
- Hits         8301     8296       -5     
+ Misses       2702     2686      -16     
Impacted Files Coverage Δ
packages/wrangler/src/pages/build.ts 68.08% <ø> (ø)
packages/wrangler/src/pages/dev.ts 17.47% <ø> (ø)

... and 5 files with indirect coverage changes

@Maximo-Guk Maximo-Guk self-assigned this May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 BUG: Build cascading with pages dev
2 participants