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: wrangler dev on unnamed workers in remote mode #557

Merged
merged 1 commit into from
Mar 9, 2022

Conversation

threepointone
Copy link
Contributor

With unnamed workers, we use the filename as the name of the worker, which isn't a valid name for workers because of the . (This break was introduced in #545). The preview service accepts unnamed workers and generates a hash anyway, so the fix is to simply not send it, and use the host that the service provides.

(Yes, I broke the build 😔)

@changeset-bot
Copy link

changeset-bot bot commented Mar 8, 2022

🦋 Changeset detected

Latest commit: fbec31e

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

github-actions bot commented Mar 8, 2022

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/1953231184/npm-package-wrangler-557

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

npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/557/npm-package-wrangler-557

Or you can use npx with this latest build directly:

npx https://prerelease-registry.developers.workers.dev/runs/1953231184/npm-package-wrangler-557 dev path/to/script.js

With unnamed workers, we use the filename as the name of the worker, which isn't a valid name for workers because of the `.` (This break was introduced in #545). The preview service accepts unnamed workers and generates a hash anyway, so the fix is to simply not send it, and use the host that the service provides.
@threepointone threepointone force-pushed the fix-unnamed-worker-dev branch from 33623ea to fbec31e Compare March 8, 2022 18:47
@threepointone threepointone merged commit 835c3ae into main Mar 9, 2022
@threepointone threepointone deleted the fix-unnamed-worker-dev branch March 9, 2022 04:16
@github-actions github-actions bot mentioned this pull request Mar 9, 2022
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.

2 participants