0

I'm fairly new to Angular2, so apologies if there is an obvious answer or if I'm misunderstanding the way server-side rendering works.

We have an Angular2 project, initially based on Steven Sanderson's .net core template, with server-side rendering etc, but we've upgraded webpack and Angular a couple of times since.

We've had to disable the server-side rendering because we're using devexpress for Angular2 (issue here), alongside a couple of other libraries that don't sit very well with server-side rendering.

Our project has now grown to a significant size, and we'd really like to have the server-side rendering back on due to the perceived performance increase, but we can't remove our dependency on the devexpress libraries.

My question is: would it be possible to split the project into modules, with all the code using the libraries that can't be server-side rendered in lazy-loaded modules, and then pre-render the main app.module?

Thanks in advance, Alex

Alex
  • 1,082
  • 3
  • 12
  • 23
  • I know this doesn't answer your question, but I would look elsewhere for performance issues before attempting to make the server-side rendering work. Put some numbers on your "perceived performance issues" before going down that road. – Dave May 02 '17 at 08:41
  • By my knowledge, server side rendering has almost no performance gain, compared to AOT. Are you using AOT in the current state of your project? – Poul Kruijt May 02 '17 at 08:44
  • @sdotdi the "percieved performance" I'm talking about is the "loading" of the Angular app - which from PierreDuc's answer looks like is the JIT compiler. I wasn't aware that AOT was a thing, so I'll set that up and report back. Thanks! – Alex May 02 '17 at 09:46

0 Answers0