I just started implementing Angular SSR with Angular Ionic Capacitor. However I am becoming skeptic if this even works, after running into some issues like:
ERROR ReferenceError: window is not defined
at impl (./node_modules/@capacitor/preferences/dist/esm/web.js:59:9)
at <anonymous> (./node_modules/@capacitor/preferences/dist/esm/web.js:13:28)
at Generator.next (<anonymous>)
at asyncGeneratorStep (./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js:3:1)
at _next (./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js:22:1)
at executor (./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js:27:1)
at constructor (./node_modules/zone.js/fesm2015/zone-node.js:1385:25)
at <anonymous> (./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js:19:1)
at get (./node_modules/@capacitor/preferences/dist/esm/web.js:14:26)
at impl (./node_modules/@capacitor/core/dist/index.js:197:35)
And even more skpetic after reading answers like this one:
"I don’t think Ionic Angular & SSR are a great fit. There are some older posts here including responses from the team. So I don’t think that will be resolved soon
Seeing the same when trying to integrate with SvelteKit. So, have to disable ssr."
So now my question is, if the two are compatible in general and if anyone managed to combine the two, without issues like the one with the preferences plugin above.
I am not looking for an answer to the small code-problem above, I am looking more for a general answer if this works. Before I spend a long time fixing small things and it in the end not being possible at all.