I’m using Project IDX to develop a Blazor WebAssembly (WASM) app, and I’m having trouble getting the Hot Reload feature to work. I’d love some guidance from anyone who’s run into similar issues or knows a solution.
Issue:
The Hot Reload functionality doesn’t seem to respond as expected. When I make changes to the code, I would normally expect these to appear in the browser automatically. Instead, I have to refresh the page manually for updates to take effect, which slows down my workflow.
dev.nix
# To learn more about how to use Nix to configure your environment
# see: https://developers.google.com/idx/guides/customize-idx-env
{ pkgs, ... }: {
# Which nixpkgs channel to use.
channel = "stable-24.05"; # or "unstable"
# Use https://search.nixos.org/packages to find packages
packages = [
pkgs.dotnet-sdk_8
pkgs.icu.dev
pkgs.openssl.dev
];
# Sets environment variables in the workspace
env = { };
idx = {
# Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
extensions = [ "muhammad-sammy.csharp" ];
# Enable previews and customize configuration
previews = {
enable = true;
previews = {
web = {
command = [ "dotnet" "watch" "run" "--project" "./Client/Client.csproj" "--urls=http://localhost:$PORT" ];
manager = "web";
};
};
};
};
}