worker: fix assets binding and SPA routes
This commit is contained in:
parent
339aef50e0
commit
2e5fb0880f
9 changed files with 510 additions and 11 deletions
|
|
@ -12,9 +12,11 @@ routes = [
|
|||
{ pattern = "www.every.channel", custom_domain = true },
|
||||
]
|
||||
|
||||
# Static assets built by Trunk (apps/tauri/ui -> apps/tauri/dist)
|
||||
[assets]
|
||||
directory = "../../apps/web/dist"
|
||||
# Static assets built by Trunk (apps/web -> apps/web/dist).
|
||||
#
|
||||
# Note: Wrangler v4 expects `assets = { ... }` (not a `[assets]` table). If misconfigured,
|
||||
# `env.ASSETS` will be missing in production and the worker will 500 on SPA routes like `/watch`.
|
||||
assets = { directory = "../../apps/web/dist", binding = "ASSETS", run_worker_first = ["/*"] }
|
||||
|
||||
[[durable_objects.bindings]]
|
||||
name = "EC_API"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue