I am working on SNOW ticket
https://diablo.service-now.com/20210803/workspace/agent/record/sn_customerservice_case/7ef92e151b2db05463bc11718b4bcb08and would like to reproduce from my side.
I create a new store based on ^3.1.3 ( actual version 3.4.1, found in package-lock.json ) and only enabled B2C feature.
I create a new repo and make initial commit:
https://github.com/wangzixi-diablo/pureb2cstore/commit/3f978420b7a7530aa8f336ef580deaa551e0e3f1![](https://img.laitimes.com/img/__Qf2AjLwojIjJCLyojI0JCLicmbw5SY0MmMhdTN1YzYxUTZhRGO4MDN0I2NmdDN1AzY5UzN28CX5d2bs92Yl1iclB3bsVmdlR2LcNWaw9CXt92Yu4GZjlGbh5yYjV3Lc9CX6MHc0RHaiojIsJye.png)
I switch on SSR support via schematics using command line: ng add @spartacus/schematics --ssr
I commit the change:
https://github.com/wangzixi-diablo/pureb2cstore/commit/adc308dfdff21079494d6995402502100670470cI use ng serve to check if CSR still works after SSR is enabled. To my surprise, after SSR is enabled, I found CSR does not work any more, http://localhost:4203/electronics-spa/en/USD/ only shows empty page:
No HTTP error in console.
I know that in certain condition, SSR will fallback to CSR. So I would assume a storefront can still works in CSR mode by default even if it’s SSR enabled. Is my understanding correct?
According to our document:
https://sap.github.io/spartacus-docs/3.x/server-side-rendering-in-spartacus/#adding-ssr-support-using-schematics-recommendeduse ng add @spartacus/schematics --ssr is enough and no further steps are required.
Do I miss something to make CSR work again after SSR is enabled by Schematics?