Isaac McFadyen | YYZ01
02/28/2022, 9:58 PMwrangler.toml
is ignored with Pages (and Functions).Isaac McFadyen | YYZ01
02/28/2022, 9:59 PMNODE_VERSION
and a value of 16.7.0
, or add a file in your root folder called .node-version
(no extension) with the contents of 16.7.0
Deleted User
02/28/2022, 10:00 PMIsaac McFadyen | YYZ01
02/28/2022, 10:00 PMPlotzes
02/28/2022, 10:00 PMbalage
02/28/2022, 10:01 PM@sveltejs/adapter-cloudflare
, do I just add it to my svelte.config.js
like this:
js
import adapter from '@sveltejs/adapter-cloudflare';
export default {
kit: {
adapter: adapter()
}
};
and that's it?Isaac McFadyen | YYZ01
02/28/2022, 10:01 PMIsaac McFadyen | YYZ01
02/28/2022, 10:01 PMIsaac McFadyen | YYZ01
02/28/2022, 10:01 PMSvelteKit
preset when creating a Pages project.Isaac McFadyen | YYZ01
02/28/2022, 10:02 PMMake sure you set either an environment variable called NODE_VERSION and a value of 16.7.0, or add a file in your root folder called .node-version (no extension) with the contents of 16.7.0
balage
02/28/2022, 10:02 PMIsaac McFadyen | YYZ01
02/28/2022, 10:03 PMIsaac McFadyen | YYZ01
02/28/2022, 10:03 PMnpm run build
) and you've got the adapter set up right you should have a cloudflare
folder appear in there too.balage
02/28/2022, 10:04 PMIsaac McFadyen | YYZ01
02/28/2022, 10:04 PMDeleted User
02/28/2022, 10:04 PMwrangler
command to take half a second or so to run? is that node starting up?balage
02/28/2022, 10:36 PMbalage
02/28/2022, 10:36 PMIsaac McFadyen | YYZ01
02/28/2022, 10:36 PMbalage
02/28/2022, 10:48 PMbalage
02/28/2022, 10:54 PMLarry
03/01/2022, 2:32 AMIsaac McFadyen | YYZ01
03/01/2022, 2:42 AMDeleted User
03/01/2022, 4:36 AMDeleted User
03/01/2022, 4:37 AMminimusubi
03/01/2022, 6:28 AMadam
03/01/2022, 9:17 AM{ "routes": { "/api": ... } }
etc
reason - don't want to use full _worker.js to handle every request, but I have a couple routes that would ideally all be handled with a single moduleLarry
03/01/2022, 4:54 PMadapter-cloudflare
maybe it's still considered Cloudflare Pages Functions but it's not using the ./functions
folder automation (routing, middleware, etc.). It's using SvelteKit's endpoint (not client-side UI) routing, middleware, etc. and compiling it down to an _worker.js
file that seems to run as a Cloudflare worker. Yes, I know that when you use ./functions
it gets compiled down to a worker also but I think of that compiling as the primary (?only?) feature of "Functions" and when using SvelteKit with adapter-cloudflare
you just aren't using that feature so it's hard for me to think of that as using "Functions". Makes sense?Larry
03/01/2022, 4:58 PM