initial version.

feat: automatically run vite dev server when in Debugger mode.
feat: supports hotreload on both js frontend and .net backend.
This commit is contained in:
lchen committed 2026-10-21 14:11:15 +08:00
1 parent f925e00540
commit 5c81ed18b2
25 files changed
+743

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>disable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<OutputType>Exe</OutputType>
<StaticWebAssetsEnabled>false</StaticWebAssetsEnabled>
<SpaRoot>Source\</SpaRoot>
<FrontendStampFile>$(BaseIntermediateOutputPath)$(Configuration)\frontend_build.stamp</FrontendStampFile>
</PropertyGroup>
<ItemGroup>
<Content Remove="Source\*.json" />
<None Include="Source\*.json" />
<None Update="Templates\**\*.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="wwwroot\dist\.vite\manifest.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<FrontendInputs Include="$(SpaRoot)src\**"/>
<FrontendInputs Include="$(SpaRoot)package.json"/>
<FrontendInputs Include="$(SpaRoot)vite.config.ts"/>
</ItemGroup>
<Target Name="BuildFrontend" BeforeTargets="BeforeBuild"
Inputs="@(FrontendInputs)" Outputs="$(FrontendStampFile)">
<Message Importance="high" Text="Changes detected. Running npm run build..." />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build" />
<Touch Files="$(FrontendStampFile)" AlwaysCreate="true" />
</Target>
</Project>