Closed RyouBakura closed 2 months ago
Looks like the failing target is ApplyJsModules
:
The JS module file '
\Components\Pages\Home.razor.js' was defined but no associated razor component or view was found for it
...which gets logged from here. Need to do a bit more digging as to why it's failing.
@MackinnonBuck I'm pretty sure the cause of this is because there's a target that's not running for JS.
We did a specific thing for CSS hot reload, and not a general thing, so I imagine that when the file gets added, only a subset of the targets needed run and that breaks things.
@RyouBakura thanks for pinpointing the issue. Having to restart my app after every change in css was driving me crazy. At least now I can temporarily delete the js file while working on my layouts. I hope this gets fixed ASAP
Is this fix in .NET 9 rc2? As I'm still seeing it.
I'm seconding @MrChriZ 's comment. This is still broken. And very annoying.
The issue is still present in 9.0.100. Please reopen this issue, this is a major inconvenience which makes it nearly impossible to work.
Is there an existing issue for this?
Describe the bug
The mere presence of a collocated Javascript file, e.g. "Home.razor.js" breaks Hot Reload functionality for .css files. However C# Hot Reload is not affected.
Expected Behavior
CSS Hot Reload should work.
Steps To Reproduce
Click to expand. It was created with the following settings:
Exceptions (if any)
18:19 18.29 HotReloadDestroyer: Scoped CSS file changed: Z:\Dotnet\HotReloadDestroyer\Components\Pages\Home.razor.css 18:19 18.35 HotReloadDestroyer: Building scoped CSS files in project HotReloadDestroyer 18:19 18.59 HotReloadDestroyer: [Error] Building scoped CSS files failed for project HotReloadDestroyer 18:19 18.59 Invalid changes were found. Please refer to the Error List window to fix those issues. 18:19 27.95 HotReloadDestroyer (Web server): Hot reload session complete
.NET Version
9.0.100-preview.7.24407.12
Anything else?
I've encountered this problem in both .NET 8 and .NET 9.