Aha, got it working, for anyone who runs
Aha, got it working, for anyone who runs into this, in the end it was simpler than I thought, just need
compatibility_flags = [ "nodejs_compat" ] in wrangler.toml and then normal functions directory just works™. It took me a while to figure it out because most of the community resources, gh issues etc are slightly outdated and took me a while to understand that node_compat = true is a build time thing not supported by pages and likely won't be (as it is legacy) and compatibility_flags is the way to go!
