Closed davidjamesb closed 7 months ago
I just built a NuGet package from the source locally and everything is working fine now, so just seems that the latest NuGet package is out of date.
Hi, the NuGet package is outdated. I'm refactoring the code before publishing the package.
The new package has been published. So, I'm closing this issue.
I have cloned the example React project and this works fine when running
dotnet run
. The vite-dev server starts up and the react-refresh script is injected into the HTML.I then swapped the existing project reference (
src\Vite.AspNetCore\Vite.AspNetCore.csproj
) for the latest published NuGet package:<PackageReference Include="Vite.AspNetCore" Version="1.12.0" />
Re-building and re-running causes the vite-dev server to start, but the react-refresh script is no longer injected into the HTML. Thus, the browser throws the following error and the client site is not loaded:
Uncaught Error: React refresh preamble was not loaded. Something is wrong.
I believe this can be solved by publishing the latest version of the NuGet package.