Larry
03/01/2022, 5:04 PM[[path]].js
or [[path]].ts
file in the ./functions
folder? Based upon this, I'm guessing that might then serve as your catch all: https://developers.cloudflare.com/pages/platform/functions/#functions-routingIsaac McFadyen | YYZ01
03/01/2022, 5:04 PM_worker.js
compiles a list of all of the static assets (like images, text files, etc) then on request it matches the request to that list and if it's a match it forwards it to Pages so that the static file is still served.Isaac McFadyen | YYZ01
03/01/2022, 5:04 PM_worker.js
.Larry
03/01/2022, 5:05 PM./functions/handle-special/[[path]].js
?Isaac McFadyen | YYZ01
03/01/2022, 5:06 PMLarry
03/01/2022, 5:06 PMLarry
03/01/2022, 5:18 PMIsaac McFadyen | YYZ01
03/01/2022, 5:19 PM_worker.js
) which get a next
that allows easier forwarding to the static file.Larry
03/01/2022, 5:26 PMadapter-cloudflare
is not really using Pages Functions. Just Pages. 🙂Isaac McFadyen | YYZ01
03/01/2022, 5:27 PMmibaatwork
03/01/2022, 6:03 PMIsaac McFadyen | YYZ01
03/01/2022, 6:07 PMIsaac McFadyen | YYZ01
03/01/2022, 6:07 PM/functions
folder Pages actually bundles it into a single _worker.js
for you, you just aren't aware.Isaac McFadyen | YYZ01
03/01/2022, 6:07 PM_worker.js
and /functions
would never be able to work.mibaatwork
03/01/2022, 6:11 PMIsaac McFadyen | YYZ01
03/01/2022, 6:12 PM_worker.js
when using /functions
and also a completely different router for SvelteKit's _worker.js
that aren't compatible when used together.mibaatwork
03/01/2022, 6:19 PMIsaac McFadyen | YYZ01
03/01/2022, 6:20 PM/functions
you can do in Endpoints.mibaatwork
03/01/2022, 6:23 PMLarry
03/01/2022, 7:59 PM_worker.js
from SvelteKit is going to be ignored, why not use adapter-static
instead of adapter-cloudflare
?Deleted User
03/01/2022, 8:06 PMcf
object is invaluable. you can create really localized content. I wonder why this strategy isn't more prevalentLarry
03/01/2022, 8:39 PMcf
object?kian
03/01/2022, 8:41 PMIsaac McFadyen | YYZ01
03/01/2022, 8:59 PMcontext.request
Isaac McFadyen | YYZ01
03/01/2022, 8:59 PMWalshy | Pages
03/01/2022, 8:59 PMadamdbradley
03/02/2022, 12:10 AMJames
03/02/2022, 12:34 AMJames
03/02/2022, 12:34 AM