-
-
Notifications
You must be signed in to change notification settings - Fork 50
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(cloudflare): Add support for txt
and bin
cloudflare specific module types
#251
feat(cloudflare): Add support for txt
and bin
cloudflare specific module types
#251
Conversation
🦋 Changeset detectedLatest commit: f078e77 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
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 |
e52355b
to
a0a031e
Compare
a0a031e
to
cb112aa
Compare
@adrianlyjak yeah a docs pr to the docs repo is needed :) |
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.
@adrianlyjak Thanks for the contribution, very happy to have it ❤️
As already said, this needs a companion docs PR in the docs repo. (fyi @sarah11918)
I personally like that you took the step to still support the old flag, so we can ship this as a minor.
txt
and bin
cloudflare specific module types
cb112aa
to
90ee0d3
Compare
@alexanderniebuhr @sarah11918 initial merge request for doc updates is here withastro/docs#8211. Let me know if you have any feedback! |
90ee0d3
to
64fac3f
Compare
Thanks for the update. Will review both PR's ;) |
* Updated docs for withastro/adapters#251 * fix spelling/grammar in cloudflare modules documentation Co-authored-by: Sarah Rainsberger <[email protected]> --------- Co-authored-by: Sarah Rainsberger <[email protected]> Co-authored-by: Alexander Niebuhr <[email protected]>
A follow on feature to #249
Changes
.bin
and.txt
files within cloudflare pages functionswasm
related code and config options tomodule-loader
to clarify that this supports multiple formatswasmModuleImports
tocloudflareModules
, retaining the previous so that this is non-breaking..wasm
imports instead of only.wasm?module
imports to be consistent with cloudflare pageswasmModuleImports
by default. Initially we'd decided to keep this opt-in so as to keep the hacky branching from breaking the build: feat(@astrojs/cloudflare): Add support for wasm module imports astro#8542 (comment). There's no more branching, so now the vite plugin here is doing close to nothing except for string comparisons if there's no matching import, so it seems safe to me now. (You'd effectively be opting in by importing the right file format)wrangler.toml
rules
(if cloudflare pages gets support for that, right now it seems to be workers only)Testing
Docs
I changed the name from
wasmModuleImports
tocloudflareModules
in the cloudflare config. The old parameter is still available, but marked as deprecated. Any opinions around terminology here? Most everything I come up with ends up sounding generic, IMO, its hard to name this feature, so I was just going off terminology that cloudflare uses https://developers.cloudflare.com/pages/functions/module-support/.What's the process for updating documentation? Should I make an associated merge request in the docs repo? https://github.com/withastro/docs/blob/main/src/content/docs/en/guides/integrations-guide/cloudflare.mdx