-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
chore: improve support for Workers Assets beta #406
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: af544f4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 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 |
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.
This PR seems to add a new option for the user. This means that this isn't a refactor, but a real minor
that requires a changeset and new tests.
I agree with the changeset, however I'm not sure about the test, because this is still |
Can you explain why our tests would fail? I don't see any new dependency added, so I probably miss some context. Nonetheless, I trust your judgment. If these workers assets are beta, I suppose that even out option should be experimental. |
Fail is the wrong term here, sorry. I meant the tests would not represent the But I agree the flag should be experimental. I'll change the code. |
/** | ||
* Enables support for Cloudflare Workers assets. Defaults to false. | ||
*/ | ||
cloudflare?: { | ||
workerAssets?: boolean; | ||
}; |
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.
What's the for a cloudflare
field? The experimental option is for the cloudflare adapter, so I suppose there's no need for a cloudflare
field. Is there something I miss?
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.
cloudflare
as to show this is a platform/host feature and not adapter or astro feature. Or do we not need that?
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.
platform/host feature and not adapter or astro feature
Oh, I see the point now. However, astro feature VS platform feature is an implementation detail, and it shouldn't be passed down to the user. Other adapters mix astro features and platform features options, which works well.
Changes
/_worker.js/index.js
url.wrangler.toml
(not sure how we can provide that to the user)Testing
Docs
cc @dario-piotrowicz @petebacondarwin