Allow users to run getPlatformProxy on static asset workers when the assets dir doesn't exist#13116
Conversation
🦋 Changeset detectedLatest commit: e568780 The changes in this PR will be included in the next version bump. 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 |
|
✅ All changesets look good |
This comment was marked as outdated.
This comment was marked as outdated.
35a7ee2 to
83fc91d
Compare
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
83fc91d to
5e3a05c
Compare
|
How does this compare to #13079? |
5e3a05c to
e7874c0
Compare
|
Codeowners approval required for this PR:
Show detailed file reviewers
|
|
@dario-piotrowicz do you have a link to an issue or something where this was discussed? I'm not 100% sure this is a good idea, and I think I would generally expect a missing assets dir to trigger a hard error. Vite deals with this by making the assets dir config field optional, which feels right to me. |
I thought there was a general consensus that we shouldn't hard error... 🤔 |
|
@dario-piotrowicz maybe I'm talking nonsense, and definitely feel free to disagree with me! But in general my thinking is:
|
Sounds good 👍 , I'll update the PR accordingly The only point that I don't fully agree is the last one, if users run something like |
e7874c0 to
71b33c1
Compare
getPlatformProxy on static asset workers when the assets dir doesn't exist
|
Codeowners approval required for this PR:
Show detailed file reviewers |
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
Co-authored-by: Ben <4991309+NuroDev@users.noreply.github.com>
e5e53da to
467a75c
Compare
|
For posterity, I DMed Ben and he did re-review the changes before I merged the PR 🙂 |
Users running
getPlatformProxymight include in their config file an assets directory that not yet exists. The changes in this PR allowgetPlatformProxyto work even if the assets directory doesn't exist yet.All other commands like
wrangler devandwrangler deploystill fails if the directory doesn't exist at deploy timeA picture of a cute animal (not mandatory, but encouraged)