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
Allow --experimental-local
to be used with module workers
#1934
Conversation
Previously, Miniflare 3 was automatically collecting modules. These collected modules were given names relative to the current working directory. Because Wrangler puts scripts in a temporary directory, these names started with `..`, which `workerd` was not happy with. This change avoids the redundant automatic collection in Miniflare, and ensures module names are resolved relative to the temporary directory.
🦋 Changeset detectedLatest commit: 9119b27 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.developers.workers.dev/runs/3136749169/npm-package-wrangler-1934 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/1934/npm-package-wrangler-1934 Or you can use npx https://prerelease-registry.developers.workers.dev/runs/3136749169/npm-package-wrangler-1934 dev path/to/script.js Additional artifacts:npm install https://prerelease-registry.developers.workers.dev/runs/3136749169/npm-package-cloudflare-pages-shared-1934 |
Codecov Report
@@ Coverage Diff @@
## main #1934 +/- ##
==========================================
- Coverage 75.26% 75.23% -0.03%
==========================================
Files 116 116
Lines 7896 7907 +11
Branches 2055 2057 +2
==========================================
+ Hits 5943 5949 +6
- Misses 1953 1958 +5
|
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.
All looks good to me
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.
Is there any way to test this?
Do we have plans to add |
Definitely! I'm hoping this won't be too complicated. 👍
We can add tests using |
#1940 🙂 |
Previously, Miniflare 3 was automatically collecting modules. These collected modules were given names relative to the current working directory. Because Wrangler puts scripts in a temporary directory, these names started with
..
, whichworkerd
was not happy with.This change avoids the redundant automatic collection in Miniflare, and ensures module names are resolved relative to the temporary directory.