aspnetcore-Vue-starter icon indicating copy to clipboard operation
aspnetcore-Vue-starter copied to clipboard

SSR is enable?

Open alexsandro-xpt opened this issue 8 years ago • 12 comments

How do you want enable Server Side Render within ASPnetCore?

alexsandro-xpt avatar Feb 26 '17 17:02 alexsandro-xpt

We disabled it for the time being but we can add it back in, and give some info on how to enable/disable it. It was previously done like this https://github.com/MarkPieszak/aspnetcore-Vue-starter/blob/91284ba8e2c67d7b2152b58be1efb89d7f7febfe/Client/renderOnServer.js in an older version of the repo.

@vip32 @anderly Should we give the option of enabling SSR now that the repo is more up to speed?

MarkPieszak avatar Feb 26 '17 22:02 MarkPieszak

I'd say let's add it back in if it's easy.

anderly avatar Feb 27 '17 01:02 anderly

yes, we can add it back if it not overly complicates the starter.

vip32 avatar Feb 27 '17 09:02 vip32

It would also be awesome if there are some comments/thoughts on how to ensure data has been loaded before sending the HTML to the client. This seems to me to be a missing piece of the SSR puzzle and it would be awesome to hear comments from some of the wizards! ;-)

cjblomqvist avatar Mar 27 '17 19:03 cjblomqvist

SSR was the main purpose for me to use this template, as VueJS have a lot of issues when it comes to SSR.

kherona avatar Jul 23 '17 13:07 kherona

Is it something we wanted back In the template?

MarkPieszak avatar Jul 23 '17 18:07 MarkPieszak

I'd prefer it to be back :-)

cjblomqvist avatar Jul 30 '17 09:07 cjblomqvist

(can be commented if you don't want it default)

cjblomqvist avatar Jul 30 '17 09:07 cjblomqvist

I'd prefer it to be back

vdasus avatar Sep 08 '17 19:09 vdasus

Nuxt.js can be used to achieve!

ElderJames avatar Dec 26 '17 17:12 ElderJames

I took a crack at this; I actually got it to work before on a different project, using SPA Services, aspnet-prerendering and vue-server-renderer.

It worked great on this other project, which I based on this original repo, but I realized that it wasn't using the vendors.config at all. Once I add that in, it starts complaining that vendor_hash is undefined. I found another guy who had a similar problem but his wasn't resolved either: https://github.com/aspnet/JavaScriptServices/issues/1660

I forked and committed my changes here: https://github.com/selaromdotnet/aspnetcore-Vue-starter/tree/ssr

if anyone wants to take a look and help me see what I'm doing wrong, we might get pretty close to solving this one, but I really don't know enough about webpack to try and figure this out on my own :(

selaromdotnet avatar Sep 18 '18 15:09 selaromdotnet

To make the current release more lean (without SSR), consider removing 'vue-server-renderer' from package.json

0xgeert avatar Jan 21 '19 16:01 0xgeert