RickStrahl / Westwind.AspnetCore.LiveReload

ASP.NET Core Live Reload Middleware that monitors file changes in your project and automatically reloads the browser's active page
Other
469 stars 42 forks source link

Blazor project #3

Closed timeshift92 closed 5 years ago

timeshift92 commented 5 years ago

Does this exclusion work with a blazor?

RickStrahl commented 5 years ago

Yes it should. Definitely for serverside blazor and for client side blazor if you host it on aspnetcore.

RickStrahl commented 5 years ago

Ok so i took a look and while you can get it the refresh to work, it looks like Blazor itself has no mechanism itself to auto-recompile on changes to Blazor files. You'd have to save your file and recompile and then it would auto refresh.

I can't find a decent answer of whether that's me doing something wrong or whether Blazor really can't self recompile views. If that's true that would make it a horrible client side technology.

Swellenator commented 5 years ago

@RickStrahl I had to put this into the .csproj file for dotnet watch run to trigger for my blazor code:

`

</ItemGroup>

`

timeshift92 commented 5 years ago

thanks for the answer, yes, and I checked blazor now with this problem, but here bolero for f # compile view on the go

RickStrahl commented 5 years ago

I think what you need in a client blazor project is:

<ItemGroup> <Watch Include="..\BlazorClientProject\**\*.cshtml;**\*.razor" /> </ItemGroup>

to point at the client project from the Core project. This works for me but it's very slow as both the Blazor app and the Core project recompile which is a pretty bad client side experience.

timeshift92 commented 5 years ago

Thanks for the answer, then I will wait for better times but for now I'll take care of the dart