1

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.

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.