ayroblu / ssr-create-react-app-v2

This is the v2, its much better written, and uses react-router v4, which is actually pretty nice
230 stars 50 forks source link

{{SSR}} does not replace #18

Open vadamk opened 6 years ago

torabian commented 6 years ago

I have the same issue. {{SSR}} is not replaced on server render, seems server render is not working.

kronthto commented 6 years ago

I had the same problem ({{SSR}} showing), and it was caused because the Service-Worker cached the file it got directly requesting /index.html, that express.static served without replacing the Placeholders. Subsequent page loads would hit this SW Cache with the {{SSR}}.

You could verify that you have the same problem by disabling/bypassing the SW cache (Ctrl+F5).

I solved this by adding the SW requested route that simply removes all placeholders: https://github.com/dieMAYREI/ssr-pwa-react-app/commit/8e6520948a890785da1cb5e4b5141a7144ba4f90

mohdhazwan commented 6 years ago

im seeing {{SSR}} too. anyone have a solution for this? @kronthto your solution not working for me

bondom commented 6 years ago

@mohdhazwan If you start your app with npm start you will see {{SSR}}, it is impossible now to have ssr in development mode with create-react-app

maximalism2 commented 6 years ago

@mohdhazwan you have to run npm run now-start instead of npm run start:server

kenshinman commented 5 years ago

Still seeing {{SSR}} in the markup even after running npm run now-start