I have been messing around with new Svelte SSR adapters since the future of Svelte will not use Sapper. I am trying to create a firebase function for SSR, but I can't seem to find any clue on how to do this.
This guide tells you how to implement Svelte so that it can use Firebase Functions. I have no problem there, but I do not see anywhere on how to setup the firebase function itself:
Installing Svelte@next
https://carlosvin.github.io/posts/svelte-next-bright-future-with-snowpack/en/
https://github.com/jthegedus/svelte-adapter-firebase
In my actual index.js or index.ts firebase function file, I do not know what to call. I am thinking something like this:
const functions = require("firebase-functions");
const next = require("./build/index.js");
exports.ssr = functions.https.onRequest(next);
I believe I am missing something so simple. Any ideas?
Sapper SSR Resources