-
Notifications
You must be signed in to change notification settings - Fork 778
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
feat: Workers Sites support for local mode #336
Conversation
🦋 Changeset detectedLatest commit: 03dd897 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 |
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 wondered whether the first commit needed a changeset. But then I realised that this will never be published, it is more of an example, than a package. So that made me think: perhaps example-worker-app
and this new example-sites-app
should not be in the packages
directory at all??
Please can you add tests for the fixes to publish
since that is possible right now. The dev
fix is not so easy to test yet, so we can let that pass for now.
An example app with a Workers Sites definition.
We were adding text-like modules (i.e. `.txt`, `.html` and `.pem` files) as separate modules in the Worker definition, but this only really 'works' with the ES module Worker format. This commit changes that to inline the text-like files into the Worker bundle directly. We still have to do something similar with `.wasm` modules, but that requires a different fix, and we'll do so in a subsequent commit.
This adds support for Workers Sites in local mode when running wrangler `dev`. Further, it fixes a bug where we were sending the `__STATIC_CONTENT_MANIFEST` definition as a separate module even with service worker format, and a bug where we weren't uploading the namespace binding when other kv namespaces weren't present.
062dea8
to
0dc3645
Compare
Co-authored-by: Pete Bacon Darwin <[email protected]>
There are 3 commits in this PR.
example-sites-app
.wrangler dev
.There are some bug fixes -
__STATIC_CONTENT_MANIFEST
definition as a separate module even with service worker format,