-
Notifications
You must be signed in to change notification settings - Fork 688
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
Make sure that the correct entrypoint file path is applied when bundling Pages applications #4676
Conversation
🦋 Changeset detectedLatest commit: 96634f3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
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/7493808436/npm-package-wrangler-4676 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7493808436/npm-package-wrangler-4676 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7493808436/npm-package-wrangler-4676 dev path/to/script.js Additional artifacts:npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7493808436/npm-package-miniflare-4676 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7493808436/npm-package-cloudflare-pages-shared-4676 npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7493808436/npm-package-create-cloudflare-4676 --no-auto-update Note that these links will no longer work once the GitHub Actions artifact expires.
| Please ensure constraints are pinned, and |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4676 +/- ##
==========================================
+ Coverage 75.60% 75.71% +0.11%
==========================================
Files 243 243
Lines 13096 13210 +114
Branches 3376 3393 +17
==========================================
+ Hits 9901 10002 +101
- Misses 3195 3208 +13
|
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.
I think that entry.file
should already be resolved by the time we hit this code.
In most cases it is. From looking up the call stack I think the problem is in packages/wrangler/src/pages/dev.ts
: if the working directory
is not defined then the script-path
(aka singleWorkerScriptPath
) is used without resolving it correctly.
7bd057d
to
2dd517b
Compare
Thanks a bunch @petebacondarwin 🙂 I've applied the change in the |
e9ded02
to
cc410e7
Compare
cc410e7
to
8cbf595
Compare
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.
I tested this locally by checking out the PR and running the following in the pages-dev-proxy-with-script
fixture:
pnpm wrangler pages dev --proxy=9999 --script-path=custom/script/path/index.js
This fails with an error without the fix and works after the fix.
Fixes #4652