Conversation
🦋 Changeset detectedLatest commit: 698d855 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 |
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: |
da569ae to
e8fda8d
Compare
| return { | ||
| wranglerConfig: { | ||
| assets: { | ||
| directory: outputDir, |
There was a problem hiding this comment.
Does this add assets.directory to the Wrangler config? We try to actively discourage users from doing that as it's not necessary and the value is ignored.
There was a problem hiding this comment.
Yes, that's what it does, ok thanks good to know 🙂👍
There was a problem hiding this comment.
Thanks. I think what we will need for standard Vite projects is to set assets.not_found_handling to single-page-application.
There was a problem hiding this comment.
Right, that's a good call, thanks! 👍
By the way, shall we check the docs for assets.directory? it looks like we include it here and there: https://developers.cloudflare.com/workers/static-assets/routing/single-page-application/#configuration
a4d137e to
c513178
Compare
packages/wrangler/src/autoconfig/frameworks/utils/vite-config.ts
Outdated
Show resolved
Hide resolved
packages/wrangler/src/autoconfig/frameworks/utils/vite-config.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Somhairle MacLeòid <smacleod@cloudflare.com>
Co-authored-by: Somhairle MacLeòid <smacleod@cloudflare.com>
Co-authored-by: Somhairle MacLeòid <smacleod@cloudflare.com>
cfbe28c to
f5fb88b
Compare
…e the function for react-router projects
Co-authored-by: Matt Kane <m@mk.gg>
Fixes https://jira.cfdata.org/browse/DEVX-2362 and https://jira.cfdata.org/browse/DEVX-2368
This PR updated the wrangler autoconfig logic in regards to Vite projects by: