Closed ChristianWeyer closed 3 years ago
Hi @ChristianWeyer
Good news! Support for isolated CSS hot-reload is coming in the new version. I'm already testing it locally, so it should be available in a few days.
Isolated CSS support is included in 1.6.17. Please see if it works in your case.
Just tried it, get this exception:
18:03:45.107: Starting job: Bundle scoped css
18:03:46.311: /Users/christianweyer/sources/blazor-webassembly-demo/Client/obj/Debug/net5.0/scopedcss/bundle/ConfTool.Client.styles.css updated
18:03:47.168: /Users/christianweyer/sources/blazor-webassembly-demo/ClientModules/ConferencesModule/obj/Debug/net5.0/scopedcss/bundle/ConfTool.ClientModules.Conferences.styles.css updated
18:03:47.176: /Users/christianweyer/sources/blazor-webassembly-demo/ClientModules/StatisticsModule/obj/Debug/net5.0/scopedcss/bundle/ConfTool.ClientModules.Statistics.styles.css updated
18:03:47.260: Job failed: Bundle scoped css
System.IO.DirectoryNotFoundException: Could not find a part of the path '/Users/christianweyer/sources/blazor-webassembly-demo/ClientModules/StatisticsModule/obj/Debug/net5.0/scopedcss/bundle/ConfTool.ClientModules.Statistics.styles.css'.
at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
at System.IO.FileStream.OpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks)
at System.IO.File.InternalReadAllText(String path, Encoding encoding)
at System.IO.File.ReadAllText(String path)
at LiveSharp.LiveSharpWorkspace.<>c__DisplayClass29_0.<ResourceFileChanged>b__0()
at LiveSharp.Infrastructure.JobQueue.<>c__DisplayClass6_0.<AddJob>b__0(Task _)
Can you check if any of these files exist?
Nope, they are not there:
Most probably, as in this class lib there are no scoped CSS files.
BTW. the entire sample is here: https://github.com/thinktecture/blazor-webassembly-demo/tree/net5-rc2
Thanks for the sample! This will make it easier.
Please try this build when you have time. It should fix the issue.
Now it works, thanks!
Hi!
I know that you are still working on .NET 5 support. It would be great and very helpful if you could look into supporting live reloading changes in isolated CSS files in Blazor WASM. Those changes need a compile step to happen.
Thanks.