ligershark / CoreTemplatePack

A collection of .NET Core project templates
Other
82 stars 17 forks source link

Compilation is too slow during development #29

Open csegyud opened 7 years ago

csegyud commented 7 years ago

Installed product versions

Description

Although I'm very impressed by the whole template pack, I feel the build process way too slow. I believe it is because it pre-renders on the server side every time I start the project. Even if I'm in Debug mode.

In Publish mode when we compile and bundle everything, it is absolutely OK, but the development slows down dramatically.

Steps to recreate

  1. Load the default project in VS
  2. and press F5
  3. modify s.g. in the source
  4. reload the browser

Current behavior

The changes are not propagated to the client by simply reloading the page in the browser. You need to restart the project in VS (Ctrl-Shift-F5) to see the changes in the browser. And this step is painfully slow. (takes 1 minute or more)

Expected behavior

During the development it should work much faster (10-15 seconds is OK). When publishing, it's OK to wait more since it has a lot of tasks to compile and render the site for production use.

Is it possible to turn off server-side pre-rendering for the development? And then turn it back for publishing? Is there a way to see my changes in the browser without restarting the project every time?

Thx.

[Update] - The changes ARE propagated automatically to the browser 1 or 2 times but after that I have to restart the project. I mean changes made on component template and component css only, not C# code or such.

ghost commented 7 years ago

Just remove the attribute from the index page to turn off server side prerendering.