Skip to content

Replace npm/React client-side with Blazor Server in Samples.Tab#481

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/update-sample-to-blazor
Draft

Replace npm/React client-side with Blazor Server in Samples.Tab#481
Copilot wants to merge 2 commits into
mainfrom
copilot/update-sample-to-blazor

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 6, 2026

Samples.Tab was triggering dependabot alerts for npm packages (React, Vite, TypeScript, Teams JS client SDK). Since this is a .NET repo, replace the entire client-side stack with Blazor Server to eliminate npm entirely.

Changes

  • Removed Web/ folder (package.json, package-lock.json, vite config, tsconfig, React/TSX sources)
  • Replaced embedded static file serving with Blazor Server interactive components
  • Updated Program.cs to wire up AddRazorComponents().AddInteractiveServerComponents() and MapRazorComponents<App>()
  • Simplified .csproj — removed GenerateEmbeddedFilesManifest, EmbeddedResource glob, and Microsoft.Extensions.FileProviders.Embedded package reference

The tab is still served at /tabs/test and the post-to-chat bot function remains unchanged.

// Program.cs - before
app.AddTab("test", "Web/bin");

// Program.cs - after
app.MapRazorComponents<App>()
    .AddInteractiveServerRenderMode();

Copilot AI and others added 2 commits May 6, 2026 13:16
Remove the Web folder containing package.json, package-lock.json,
TypeScript, React, and Vite configuration. Replace with Blazor Server
components to eliminate all npm dependencies and associated dependabot
alerts.

Agent-Logs-Url: https://github.com/microsoft/teams.net/sessions/46b3dd3f-b764-42d8-a98d-5310e0d2a88c

Co-authored-by: rido-min <14916339+rido-min@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants